#development
1 messages · Page 687 of 1
and it gets worse the more code you have
doesnt everyone have an API ?
alright, thank you
what?
an api for what
im rewriting my entire bot to work with pm2 clusters
i just run everything in a single process
i mean i got myself my own CDN and my own API
although the libraries i use can handle that
i've done some message queue based stuff in the past but it was too much effort for too little benefit
M gateway process(es) send payloads to a queue, where N workers process them (with N possibly different from M)
that different to the python lib im using
or wait
does discord handle the sharding
i mean not splitting it
but i mean if i have lets say
shard 1 and shard 2
will discord handle it out
alright perfect
you send total shard count and shard id
which is what makes scaling bots a fucking pain in the ass
not at all
i can easily automate the sharding
you need to restart everything to add more shards
if i put in the sharding information into an SQL database
you need to restart all shards to increase
and you need to track a ton of state on your end
state?
instead of eg "add one more worker to handle the increased load, then when it drops kill it"
the cache, the ws connection, ...
and killing the ws connection kills all voice connections for that shard
even if you resume the ws
yeah i see
what if you reboot shards sequentially with a different value? there is a risk of guilds overlapping, or will discord disconnect your other shards?
could make a test, if you increase the shards by a multiple that keeps the same guilds to the same shards
then reboot them one by one
idk if its possible with the formula tho
it exists in most libs
the guild count or the shard count
keeps the same guilds to the same shards
not possible
formula is shard_id = (guild_id >> 22) % shard_count
shard count
you can fetch the recommended shard count from /gateway/bot
what is ">>"
also the code i currently have doesnt care about what shard the user is in
shard 2 shard 9 it can switch whenever it wants
it doesnt matter
all the datastorage is handled in my webserver
right shift
ah alright
@inner jewel however if i were to add a voice chat that'd be a trouble
which i wont, cause currently my bot is very very dedicated to be good at one thing
My bot was dedicated to two things when I reached that and felt like it was good enough I branched out.
How i can make command without prefix and index.js
i can't defined 'args'
Uhm make command without prefix?
yep
Well if you don’t wanna use a prefix just check if message.content === theWord
args?
You don’t need args in this situation iirc
But i need!
Wha~?
I’m confused
@earnest phoenix whats your code?
Although I wouldn’t recommend doing that
message.content will get the content of the message they sent and if the content matches the word you’re checking then the command will work.
Same but I just answered their question
Cause someone Can Just spam the word
someone could also just spam a normal command
But its also annoying
having a prefix or not doesn't make it less spammable
Ik
I’m not stupid
This can set it off
@quartz kindle 8ball command;
let message = msg;
let cevaps = [
'Kesinlikle Hayır',
'Aynen',
'Olamaz! Bu Imkansız!',
'Öyle Düşünmüyorum',
'Kesinlikle Evet',
'Ne Desem Bilemedim',
'Bilmiyorum',
'Emin Değilim',
'Kararsız Kaldım'
];
let min = 0
let max = cevaps.length - 1;
let messageArray = message.content.split(" ");
let command = messageArray[0];
let args = messageArray.slice(1);
let ques = message.content.split(" ").slice(1).join(" ");
if (!ques) return msg.channel.send('question.');
let r = cevaps[Math.floor(Math.random() * cevaps.length)]
msg.channel.send(r).catch()
});```
If the word they said matched the one set
That’s not even gonna work the way you have it
@earnest phoenix if(message.startsWith("8ball"))
it'll keep spamming
Yeah
Why define it as msg if you’re just gonna use message
it has an ~80% chance of triggering itself
so it's chance of spamming the channel for a long time is high
only 80%?
So if I use the unique thing in one of my tables
it'll spam forever
Hmm
if (!ques) return msg.channel.send('question.');
"question." triggers that if
so it'll keep triggering itself
And I set the unique for ID and guild ID
Wait nvm
Answered my own question in my head

Not work.
Itrying to make a command for a single guild?
?
Ex: 8ball <ques> not working only 8ball single working..
No
?
No spoon feeding
They won’t learn by just copying code.
@lusty dew
Not random pinging
Yes
that code hurts my eyes
Lol
Heh
then help me
Same

Were trying
We are trying
Lol
belli
You’re not listening
sure?
Plus not even completely sure what you wanna do
then why I have 2 k servers?
Okay I’m not gonna help you with that attitude
If you have 2k servers figure the problem out yourself.
I'm, not wanting your helps. Thanks...
No fighting here ty
I’m not fighting :)
Just trying to help someone who won’t listen
Btw Shivaco I have a question
Seriously?
Ask your questions right away without the "I have a question" kind of thing please
Why can my bot see #265156322012561408 but not #commands
ID
client.on("message", async (msg) => {
if (msg.content == "8ball"){
let stuff = [ 'a', 'b', 'c', 'd' ]
let randomIndex = Math.floor(Math.random() * (stuff.length + 1))
msg.channel.send(stuff[randomIndex])
}
})```
not sure whats more to a simple command without a prefix that returns a random list element?
I’m pretty sure other languages go in #memes-and-media
well, what library are you using again? d.js?
Hmm
No spoonfeeding here ty
i dont know what methods d.js has but theres no reason this code wouldnt work
¯_(ツ)_/¯
@potent ivy working but when I typing 8ball <text> not working i mentioning this.
then dont compare the content of the message to the string but rather check if it starts with that string
string.startsWith("")
@earnest phoenix Who did you name it?
@earnest phoenix
string ?
can you give me example command
@earnest phoenix
Couldn you just do:
let stuff = ['m', 'l', 'h']
let randomIndex = stuff[Math.floor(Math.random() * stuff.length)]
message.channel.send(randomIndex)

no spoonfeeding

@lusty dew i mean that wouldnt be a random index bur a random element, but yeah sure
Wasn’t giving them anything intentionally
not exactly an improvement though
Do you have a decent understanding of the library you're using
It’d get a random string from the array
Keep Calm Aq
Research:
Math.random()
String#split
String#startsWith
You can solve your issue using those resources
Who me?
İ did'nt understeand,so thanks...
There's a moderator here to watch the chat, no need for minimodding
I have never gotten in trouble for swearing
huh , right.
Is it against the rule Shivaco
Back to the issue maybe????
The exact opposite :)
The issue has been resolved by the looks of it
So why is this channel used for off-topic crap then
ily ask2ask
Dont ask to ask
Just ask your question
it wastes time if you say "i need help" or "can someone help me?" instead of just saying what the problem is. Save your time and other people's time and just ask the question.
i bought the discord bot maker but idk how to use it. can someone help me?
discord bot maker isnt really how you make discord bots
it can be
wdym
go to dbm support
k
do you have it working per guild already?
I’ve thought about making the ID the db uses the userID but idk if that makes it global
I have it per guild in my old db
But I, rewriting it again
just make another table for global exp?
imagine its another server
dunno how exactly your structure looks like rn but yeah
I’m using sequelize
well uh, i assume you dont want to scrap your data, so you want to keep the currently gained "ecenomy" thingy whatever it is
that makes it a little harder since you cant just make a new fresh table and call it a day
Basically just:
module.exports.Economy = sequelize.define('eco', {
id: {
type: sequelize.TEXT,
allowNull: false,
unique: true
}
})
That’s how the id would look
Oh the economy functions aren’t even out to public yet
So idc about scraping all the data from it and making a new table
I used better-sqlite3 for the old db
Speaking of better sqlite3, is there a plugin to have direct array support?
Github: https://github.com/eramedia-coding/BS-X-Bot
I can't get heroku to work, a do have Procfile and did everything correct, but it still throws the errors
and what are the errors?
when i try to boot it manully i get this
/app/events/Satellaplay.js:21
"value": "This Service is only in the US."
^^^^^^^
SyntaxError: Unexpected string
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/app/bot.js:10:21)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)```
@golden bone better-sqlite3 doesn’t support arrays
Oh idk then
@sick comet you forgot a comma on line 20
oh
i still dont get how to use dbm
Tried asking in DBM support server yet
wdym
I thought DBM had a support server?
they do?
So why not ask there
can you send me an invite or smth?
Look around the app's About or use Google
ok
@golden bone i suggest you using json dumps
cause sqlite3 doesnt have native json support
neither list
I wouldnt use json as a db if that's what you're talking about
why not 
Oh but Json databases are the best
json is not bad if you do it right. it has the same limitations as sqlite
no
Why did you send a serverinvite to the worst bot making software
because he asked for it you smartass
can you send me an invite or smth?
json lacks in data types and has huge space for syntax errors
idc
But what ever
Oof
?
@earnest phoenix obviously, I never claimed its better than sqlite, but its not that bad like people think it is (because all the noobs use it wrong)
I think I was just banned from DBM 😂
Idk
so what do you need help with?
But I dont like dbm
I don't either, but I got him out of this channel by passing him to dbm
My opinion
Kek, I got banned for saying anyone who uses DBM aren’t real developers
but something specific? 
Read the docs?
????????
Read the docs of your language
FINE
I mean...status will be on it especially a way to change it
u do client.user.setStatus('sumStatus')
Use a switch and args if you want to configure it
Ik
Then why you asking for help
...
wdym
He just told you
Shudup
Keep things civil
XD

client.user.setStatus will set the status to whatever you want ?
Then what is your problem
USING A COMMAND
Put it in a command?
With Args
What’s hard about that
Keep. Things. Civil.
Then use args
Everything
I’m not gonna just give you the code.
Okay so
With Args
dont you hate when it happens? people copypasting some code from internet without understanding it D:
To get something from a message you sent use args
https://discordjs.guide/creating-your-bot/commands-with-user-input.html
there you can learn how to use args
then you just do
setUwuStatus(args[0])
Check before, if its a valid status, obviously
Stop Ik I’m a furry but jeebus
Lmfao
you can either join args with a whitespace or not use them in the first place and just slice/substring/replace(cmd )
/ +/g
i assumed he meant game name tbh
Status and game is different no?
That'd be presence
yeah its different
Im reading
Have we even asked if he uses d.js
Yea same
The common
I don’t that’s why I’m asking 😂
Less things in common
...
Anyway time for an actual question 😂
Whats a snowflake?
A userID is a snowflake
533087906714091520
Hehe
That’s your ID
IDs are snowflakes
So it can be a message id, server id or user id
God discord is so smart 😊
Message, server, channel, user or client ID
they are called snowflakes because they have some special properties like date extraction, also javascript likes them as strings
You can make a bot be
online
idle
offline
dnd
and streaming, but thats a part of a different method
ye
I don’t think you can make a bot go offline at least I’ve never been able to do it
I have
pull the plug
Yes its possible
Hehe
Does Discord automatically shard your stuff tho?
no lol
Theres a method of autosharding or something
Uhm no
Discord doesn’t automatically shard for you
d.js master can do internal sharding, so you don't notice/have to care
Yes
Lmao
I use d.js master
but if you have really large bots you should use internal sharding
Hehe
you still have to tell d.js it shouls shard
i like how you just went into sharding your bot right after asking how to set up your status
are you sure you know what sharding is? and are you sure you need it?
npo, d.js old sharding way: start x new processes connecting to the master
new way (internal) start new websocket connections
Its basically spawing more node.js clients?
the old way was spawning more node.js processes
For easier processes
I just have in the Discord.Client({
shardCount: 'auto'
})
@lusty dew thats how I can make your bot go offline
http://i.am.being-a.fail/ure/vDIb
very simple
Uhm
Lol
?
no it will shut my server down, lol, not doing that
Lol
Also is there anyway you can block my old dev from accessing the server?
just make the bot go invis
change pass
passwd
Hmm
its cool, yeah
XD
I mainly used it for session storage, I killed that project tho
and?
not trying to be rude, but its not magic if you ever saw a command handler before
write a command handler that uses classes
even better, a commandhandler using an abstract class in typescript 
typescript is epic
No
typescript is my wet dream
everything is save, you don't have to guess if its the property or not
Uhm okay
it's 𝓫𝓮𝓪𝓾𝓽𝓲𝓯𝓾𝓵
OOP is amazing
everything is oop
i started understanding oop when i started using ts which is odd
typescript is my wet dream
yeah js is not very oop
and i oop
anna ou sksksksksk sis TEA PERIODT
tbh, I couldnt think to use angular without typescript, it would be awful
im making a weird ass lib which has a built in command handler that uses djs events as command routes
lmfao

just appreciate my comments, thanks
Lol
lock the user from using your command unless they use oauth2 to authorize your bot to have access to the user's email, guilds, location, IP & social security number
Hmm
I literally have a property on my commands called voteLock 
Palenight Theme @zealous veldt
reported for ads \s
How would I write a cooldown for a command?
uhh, persistent over restarts, or in memory?
good that you mention it, I need it too
I’m making like 4 different tables with sequelize
Kek
Guild, User, Economy, and Promo
honestly you should always go for in memory unless the command has this gigantic cooldown and is really heavy on resources
I have to write an api at work that has like 15 tables 
Big oof
Hmm
and they all had relations to each another
What does the api do
How do you write an api
With code
I currently do it with loopback 4
@lusty dew smartass
What does the API even do?
its for tracking time, vacations, projects, tasks, kitchenduty
just company internal stuff
Kitchen duty
XD
Got some chefs up in there
Where is discord’s headquarters
In California
I knew it was on the west coast
San Francisco
for a that large company they have a very bad developing mechanism
very slow
very bad
Discord?
Okay well when I searched up Discord headquarters I got the police department
You have to think
they allow major bugs to come into production
lol i live like an hour from discord hq
(like the fuckup with code blocks)
how can that get into prod?
You have to think discord is understaffed rn
discord is mostly amateur developers that'd rather spend their time in fursuits than doing their job
@earnest phoenix offensive
but true
Ehhh
Why dis the program you’re using
Kinda True Depends
so i digged a bit in the asar to kill time and some of the TODO's are funny
if you need to kill time help me finish my bot \s
Better air horn?
I am not good at code

discord should really add github integration
but no need asking them for it since they would just redirect to their "feedback forum"
CHY4E let’s make an api that uses 20 tables
discord should host out bots in their servers
that has always worked and brought so many new things
0 ping
Kek
huehuehue
Lmao
@lusty dew but with what
haha yee, i thought that was how it worked when i was much younger 1 year ago
nah, they are mostly amateurs
ddg searched "how to have discord bot online without command promt" a few times
Oof
someone on d.js asked if he can compile his bot, so he won't have to run his pc
comile
you'd be surprised by how many kids search that
lel
I thought that too, for like 10 mins, then I got it
I just searched up how to put my bot online
but I learned very basic coding in school before
I would like to formaly apologise for all my bad questins i pestered d.js discord server with for my first 3 months
@harsh nova yeah same, I literally had a fight with evie because I didnt understand enmap lmao
My Highschool has a robotics class but it’s all drag and drop
I’m trying
you dont need a .edu mail
Don’t think they will accept me though
@earnest phoenix my old school didnt (and still doesnt) offer programming classes. I only learned it in a school that was specially dedicated for it (and is pretty much the largest and only tech school in the area)
I’d have to drive a bit of ways to get to a tech related school
At least a good one
We have some pretty crappy ones around me
I just put my mail and it said "<where i live> Municipality", i was accepted almost directly
very epic
my class was for losers who didnt got a job and are interested in computers
and 12 out of 30 people actually got their "degree"
15 people quitted after one year cuzz they did big zucc in programming
counter strike source?
any improvements for this method? it seems kindy clunky to me
https://txtupload.cf/kl6#rham
do it how you would do it in maths
you can express it either as a float (100% = 1, 50% = 0.5) or without the percentage symbol, as a number (100% = 100, 50% = 50)
I don’t think it’s supposed to be nested
i don't know, you tell me
you probably want to switch inside of log_toggle case
that is not how switch case works
And outside of the first switch
that is not how switch case works
Okay...
I don’t fully understand how they work.
I read MDN but it didn’t really explain that much other then stuff about forgetting a break, multi-chaining cases, etc
return is basically break
but the issue is that the switch case is nested
that's not allowed
👀
no wait now i see
you gotta make a case
before ur switch
case smth
switch
your indent says the switch is in a "case only" statement, that's not allowed
indentation doesn't matter
the switch is dead code because there's a return right before it
So removing the return will make it work?
I don’t use switch statements much so no
case (smth) is basically (if statement then)
mhm
and you can think of a switch as a bunch of if-elses
I’m trying to fix my settings cmd lol
I came across that as I was changing out the db stuff
and no one can help you if you don't say what's broken
Idk what’s broken yet I just saw it was grey
its grey
I’ll have to test it
as far as validity goes, that's perfectly valid code
That’s already been stated thank you
your editor is just warning you that the switch does nothing
return is same as break, so it stops
Okay thanks Nathan
you have to use a case (smth) before you create another switch statement
Natan*
Correct?
What do you guys think of making a mobile app in unity for Android? Still worth it in late 2019?
when will my bot get verified
yeet faq
Click the links to get more information on a question:
- How do I add a bot?
- How long is approval?
- How do I make a bot?
- Why am I logged into the wrong account?
- What is classified as "shitpost" or "off topic"?
- Mini-modding / Backseat Moderating?
- What is this place?
- What is #starboard?
- How do I report Bugs / send Feedback?
- What's wrong with pinging Moderators?
- What is #api and #development for?
- How do I get Moderator?
- How do I turn my bot on?
@idle mountain @abstract crow has a unity question
In java is there any other way for filtering an array other than using .stream?
manually filtering
With a for loop?
Anyone like my server? Only costs 19V == 3.42A. Lmao
Runs node.js and visual studio c++ so it's perfect and cheap to just have on 24/7
Cheaper than a server vps btw. £15 for the pc total not monthly
@abstract crow yes
65w server (so 0.065 kWh/hour) x 24 x 30 = 46 kWh/month
which is most likely more expensive than a vps
@brave elm
https://hatebin.com/qclhqldgri
I don’t understand why I’m getting this error. The docs says the DataType I’m using is correct
https://hatebin.com/pgmfsodvjy
Don’t use a Json as a db
It’s something that will corrupt
And I really dont wanna code an entire thing for a RethinkDB
Don’t use Json as a db....
It can corrupt due to things being continuously written to it
So what use Rethink for that
Yes.
How
Are constables a solid value that doesnt ever change?
Idk I’m just asking random stupid questions
Unless you know sequelize
Or the ability to read docs better then me
I’m using sequelize + sqlite3
Wait I think I’m doing it wrong lol
The thing is is when you use Rethink You Have to Have 3 replicas to have 2 shards
Oof
Hehe
Yeha
Its fine
I have like 6 replicas
Hehe
Friends Run RethinkDB with me
Oh cool
I’m perplexed why this isnt working
Well 2 in US if you count TrisDevs Central My Server
So 7
But I think I might try to use a SQLDB for this project
Should I use A SQL DB?
Preference
You'll get nothing but bias from that question
Like me, I'll say no
But that's because Im bias towards nosql because I've never used sql dbs
Never bothered learning the syntax
My answer is No
I may use em but like, just because it’s easier to learn.
Though the syntax is weird
Not always very descriptive of where the error originated from or what caused it
Also it’s kinda fun ngl.
Same
How do I select something from a table using sequelize
Like I want to get the prefix of a guild
If you used Guild.findOne(), the resolved object would contain all the fields that are in the table
@lusty dew
Show code
...
Will you go away if you aren’t going to contribute
I tried:
const prefix = Guild.findOne({prefix}) kinda knew that one wouldn’t work but I tried
const prefix = Guild.findOne({where: {id: message.guild.id, prefix})
What scenario are you writing this code for?
Like why do you need this
Is it for a prefix command, or when messages are handled, etc
Messages are handled like
If the message starts with a prefix from the db or if one isn’t set it will use the default prefix
And do you have prefix defined as a variable somewhere in your code already?
So you want to find a guild that uses that specific prefix?
let prefix = message.content.match(RegExp(`^<@!?${client.user.id}>`))
if (prefix)
prefix = prefix[0]
else {
prefix = Guild.findOne({where: {id: message.guild.id, prefix}}) || client.settings.prefix
if (!message.content.startsWith(prefix)) {
}
}```
That’s inside a message event
I don’t see how , prefix helps you
Well yea.
Ok get rid of , prefix because that’s not what it does
, prefix is shorthand for , prefix: prefix which means it’ll try to find only the DB entries that match prefix[0]
Okay
The second problem I noticed was that Guild.findOne() returns a Promise, so you need to use async/await or .then()
Okay
So how would I get the prefix then?
Or would Guild.findOne({where: {id: message.guild.id}})
Pull all the info from that table matching the ID?
It’ll resolve a promise that has all the info
From the thing it resolves, you can do .get(“field”) to get any field
So .get('prefix')
Okay thanks
Can it be an array if I want to get multiple things?
Or would I use commas
Like .get('prefix, log_channel')
No just get the different things you want separately
Like const prefix = res.get(“prefix”);
@opaque eagle it is like:
await Guild.findOne({where: {id: message.guild.id}}).get('prefix')
No, store the Guild.findOne() in a separate variable first and get prefix from there
Okay, may I ask what the difference is?
Guild.findOne() returns the promise, not get(). In that code above, await applies to the get(), when it should be awaiting the Guild.findOne()
Do it on the guildCreate event
Well what about the already existing guilds the bot is in
guildCreate is the event that’s triggered when the bot is added to a new Guild
Manually add those I guess?
Adding it on guildCreate is the future-proof solution
That’s like 26 guilds oof
Then write a script to do it for the current guilds
And then from that point on, do it on guildCreate
Maybe time to read either the tutorial or docs
What's the cause for "Discord API Error: Unknown Message" error? I've tried fetching the message from the channel with eval and it fetches perfectly fine. Any suggestions on how I can fix this is appreciated.
Can I do Guild.create({id: guild.id})
What?
What are you trying to do
Since id is the primary key it’d write everything that the table has to that guild right?
So like the guildMemAdd column, guildMemRem column, prefix column, etc
@opaque eagle how can I create it manually if it isn’t even allowing me to use the default prefix cause the prefix from the db is null cause there is no entry for the support server
If there’s no entry for the support server, I’d add it manually
Like using the command line
Yeah lol, you can run regular sql queries in the command line
SQL syntax
And I installed sqlite3 so ima assume I use that
The SELECT * FROM etc etc etc are SQL queries. SQLite is a file-based database that allows users to interact using the SQL language
@lusty dew check if there's a row in the table for the guild ID, if not, let prefix be default prefix
I got it kek
I just removed using the db and put let prefix = client.settings.prefix
To create an entry for the db
Okay so it is saying it is null in the console but when I manually created the db entry using eval it outputted this:
https://hastebin.com/tunudoziko.js
Okay nvm
It was me being dumb
How did I miss it twice
😂
I used message.author.id instead of message.guild.id
Why do I get object Promise
I’m pretty sure that happens when you don’t await something
But I already awaited it
what's your code
let res = await Guild.findOne({where: {id: message.guild.id}})
res.increment('case_counter')
@earnest phoenix
embed.set_author(name=f"User Info - {member}")
^
SyntaxError: invalid syntax```
async def userinfo(ctx, member: discord.Member = None):
member = ctx.authot if not member else member
roles = [role for role in member.roles]
embed = discord.Embed(colour=member.color, timestamp=ctx.message.created_at)
embed.set_author(name=f"User Info - {member}")
embed.set_thumbnail(url=member.avatar_url)
embled.set_footer(text=f"Requested by {ctx.author}", icon_url=ctx.author_url)
embled.add_field(name="ID:"), value=member.id)
embled.add_field(name="Nickname:"), value=member.display_name)
embled.add_field(name="Joined at:", value=member.joined_at.strftime("%a, %#d %B %Y, %I:%M %p UTC"))
embled.add_field(name=f"Roles ({len(roles)})", value=" ".join([role.mention for role in roles]))```
-=- python -=-
I’m going to do the unthinkable
I’m outside with no laptop and only my phone
I’m gonna be one of the plebs that make a bot on their phone
Nvm we’re leaving
Lol
@fallen gulch ctx.authot
why not just do roles = member.roles
Why is embled there
@bot.command(pass_context=True)
async def userinfo(ctx, member: discord.Member = None):
member = ctx.author if not member else member
roles = [role for role in member.roles]
embed = discord.Embed(colour=member.color, timestamp=ctx.message.created_at)
embed.set_author(name=f"User Info - {member}")
embed.set_thumbnail(url=member.avatar_url)
embed.set_footer(text=f"Requested by {ctx.author}", icon_url=ctx.author_url)
embed.add_field(name="ID:"), value=member.id)
embed.add_field(name="Nickname:"), value=member.display_name)
embed.add_field(name="Joined at:", value=member.joined_at.strftime("%a, %#d %B %Y, %I:%M %p UTC"))
embed.add_field(name=f"Roles ({len(roles)})", value=" ".join([role.mention for role in roles]))
await ctx.send(embed=embed)```
embed.set_author(name=f'User Info - {member}')
^
SyntaxError: invalid syntax
what python version?
3.5
I know this issue, but I don't know how to fix it. I need to make it look in another folder (dist)
How can I change the directory to go through a folder called dist?
I'm using Visual Studio Code
Edit your config
@fallen gulch F strings was implemented in python 3.6
I mean package.json
you need "main": "dist/index.js"
For development I recommend to use ts-node, and not compile all the time
I'm new to this so I need to learn things and it's not hard, but somethings like that, I know what's wrong, but I don't know how to set it.
Yeah, I'm currently using .ts
I'm following a youtube playlist for now.
He explains everything, how it all works so it's good.
Yeah, typescript. And while developing you can do ts-node src/index.ts instead of compiling
Ahh okay
Thanks
I still get the sma error
same*
That's how I've done it, that's in package.json
I still get that v
It's still trying the other directory.
@onyx summit
It's still trying to do it without the extra folder.
I might be asking this in the wrong place, but I could not find where to ask.
If I have a finished bot, and do not want to permanently keep DBM active on my pc 24/8, where would I need to upload the project to, to have it active at all times?
and yes I understand I am meaning a server 😛
let res = await Guild.findOne({where: {id: message.guild.id}})//outside embed
res.increment('case_counter') // Inside embed
are you sure increment doesn't return a promise
Node.js ORM for PostgreSQL, MySQL, SQLite and MSSQL
@solar cosmos any server will do (like a vps).
Some people use glitch cuzz it's free, but I can't recommend for "bigger" bots


