#development
1 messages · Page 1679 of 1
Read the docs
Ty
.setAuthor
.setTitle
.setDescription
.setFooter
.setColor
@earnest phoenix this one is more explained

spoonfeedddd
no, let them read the docs
This channel sometimes makes me lose faith in humanity
Teach devs independence
You can't hold their hands forever because after some point you won't be there anymore
now i know why tim looks like a babysister
It would be better to read the actual docs so that people can get acquainted with data types which will dramatically improve logical thinking
Tim should retire ngl
@earnest phoenix 🤒
?
@earnest phoenix what about my DMs🙄
-
Tim retire *
-
everyone come back to Stone age *
no
he live here as a Stackoverflow guy
oh
Tim is the walking stack overflow
SirTimme?
LMAO
Literally "Tim"
this -> @quartz kindle
oh ok
nice way to avoid notification
I edited the mention in so that I don't annoy him 😛
edited messages with new mentions don't notify mentioned
yeah @willow mirage
it doesnt actually notify when u edit
you helped me a lot
oh jesus its 330 am 
what I have done bro
local or cloud mongodb?
lmao, 2h for breaking a line?
buy now
I use cloud, cuz it is free and doesn't take a lot of RAM Cpu on my vps

@earnest phoenix btw, what lib did you make to receive lib dev role
lua?
Oh. Poggers
Lua is pain
damm
batch lib when
@earnest phoenix ig you can make roblox games :D
Why doesn't lua have classes
lua indexes start at 1. lua is weird
What is prolog
I don't, I don't even play Roblox
xD ik
String indexes in Pascal.NET start with 1 and dynamic arrays start with 0 :D
wtf
Oh my god
case "bal":
case 'balance':
const opponent = message.mentions.users.first()
var cdmoney = await db.fetch(`cdmoney_${message.member.id}`)
var money = await db.fetch(`money_${message.member.id}`)
const balanc2e = new Discord.MessageEmbed()
.setDescription("\\💸You have " + `\`${money.toLocaleString() || 0}\`` +"$ on you" + "\n\\💳 And " + `\`${cdmoney.toLocaleString() || 0}\`` +"$ in your credit card" )
.setColor("BLUE")
if(!opponent) return message.channel.send(`${message.author} \n${balanc2e}`)
var cdmoney69 = await db.fetch(`cdmoney_${opponent.id}`)
var money69 = await db.fetch(`money_${opponent.id}`)
const balanc2e69 = new Discord.MessageEmbed()
.setDescription(`\\💸${opponent} has \`${money69.toLocaleString() || 0}\` $ on him \n\\💳 And \`${cdmoney69.toLocaleString() || 0}\` $ in his credit card`)
.setColor("BLUE")
if(opponent) return message.channel.send(balanc2e69)
break;
when someone who has null money it gives an error 'toLocaleString' of null
Just check for nullability
I learned lua once and I stoped. It is weird that arrays start at 1 and more thigns
@pastel fern cool
you guys know the new ES2021?
Sorry but
Of course I know it, I'm one of the contributors to ES
@earnest phoenix damm
ESNext is pogging
?
@earnest phoenix
I am getting error on track while typing
const { thumbnail } = track;
Any solutions
But what's the error
To get started, join a voice channel and !play a song. You can use song names, video links.1
Commands
Full list of commands listed here
Support
Join our support serverif you are having trouble or have any questions.```
bot is sending like this
i need to now how to give gap in embed
but if its like that
how can i add it?
The same thing in embed
Literally add what I said
\n .addField('Support', '[Join our support server]("My server link") if you are having trouble or have any questions.', true)
like this ?
oh f
inside ?
ok
show all of ur code?
Are you trying to make blank fields
ok
wait
.setTitle("")
.setColor("BLUE")
.setDescription("Invictus is best bot for playing music in your servers . it supports youtube , soundcloud more coming soon ! \n \n To get started, join a voice channel and `!play` a song. You can use song names, video links.1")
.addField('Commands', 'Full list of commands listed [here](https://www.instagram.com/ruthless.dzns/?hl=en)', true)
.addField('Support', '[Join our support server](serverlink) if you are having trouble or have any questions.', true)
.setFooter("")```
see
@earnest phoenix i dunno why there are still ppl who install my lib
yeah, that is correct
?
wrong one
what
5% brain cells lost so far
yeah?
lmao typo
i need support field down
@median iris do the same thing bro
@median iris then disable the inline
.addField("name", "value", Boolean: inline)
:)
.addField('name', 'value', inline?)
.addField("Something", "Bruh", false)
what the fuck
Module not found: Can't resolve 'fs' in '/home/runner/Blog/pages'
Could not find files for /index in .next/build-manifest.json
ModuleNotFoundError: Module not found: Error: Can't resolve 'fs' in '/home/runner/Blog/pages'
fs is a builtin module
how can nextjs not find that
Next.js scuffed moment
pug & templating > react
Ads 
.addField('Support', '[Join our support server](serverlinks) if you are having trouble or have any questions.',true)```
pls did that in this
im confused rn
You're enabling inline on both of them
true -> false

best option that repl allows
Repl allows that?
@earnest phoenix https://github.com/vercel/next.js/issues/7755
im importing it outside of getStaticProps maybe that's the problem
¯\_(ツ)_/¯
can some one help me???
just wait
I want to definition of message event in ready event
What
What you said doesn't make any sense
Try to break your point down into simpler words
i don’t know how to explain that ._.
So you want to get a message object in the ready event...?
You first have to get the channel the message was sent it
You can't get a message from the ready event unless you fetch it from a specific channel under a specific ID
hmmmmm
I am take every thing from json
so i should to use message
Get the channel the message was sent in by ID (<Client>.channels.cache.get()) -> fetch the message by ID (<TextChannel>.messages.fetch()), this returns a promise so resolve it
namr of the channel not the id._.
wait
am gonna ask my friend he can arabic ha gonna help me
thanks @earnest phoenix @slender thistle @opaque fern
ok!!
TypeError: message.client.manager.get is not a function
🙄
Have you logged what <Client>.manager even returns
Yes
And?
Wht?
What is client.manager
May you show us what it logged?
Another thing
description: ` Loop is **\`${serverQueue.loop === true ? "enabled" : "disabled"}\`**
this is code
and i need to remove
this
what
yes
And?
yah

And?
nothing
That didn't change anything
he wasn’t use the `
I told you to remove the \` not ` 
bruuuuuhhhhhh
Why the === true specifically?
kinda useless tbh
Please consider learning basic JS and reading the documentation
that === true is uneccesary
i will give u wait
no dont
why
don't spoon feed
ok!!!
tHANKS MAN
-_-
bruuhhhhh
are you giving me pls
Learn basic JS -> https://www.codecademy.com/learn/javascript
Read the documentation -> https://discord.js.org/#/docs/main/stable
@median iris
Codecademy
If you’re not sure where to begin or what to learn next, this is a great place to start. Check out our top coding courses, Skill Paths, and Career Paths.

you learn from doing not copy pasting code
ok ill learn
if you just wanna copy paste code you might as well just use botghost at that point
Don't mention that forbidden thing
lol
yada yada
Ty all
Just straight up program in bytecode wdym
just code straight in binary you mean
WASM ftw
Just tell the computer what to do, have a little conversation with it
speak into ur microphone
Fucking speak in radio wave frequencies
tell it what you want
What is the best lib to programm a discord bot??
make your tooth blue and communicate with ur computer using ur blue tooth
Any programming language you're efficient with
Depends on what programming language you're using
there is no best lib
erwin will say its detritus but its not
libbb
lol
Same goes for libraries
yes
i think am gonna learn erly.js or eris.js
It's all preferences
there is no best lib
Nice
thanks every one
just pick what you want
eris.js 
just pick what you want
Its eris
urmom.js is really pogging
wanna know my lib
what
wtf
its a fork of discord.js-commando
which is a command framework
as they say
basically commando is the command handler for you
with some extra features it provides that normal discord.js hasn't
lol
I made a fork of it that makes it use discord.js-light instead
Discord-akairo > discord.js-commando
never heard of it
It's kinda nice, but a little scuffed 
All command handler libs suck
Same with discord libs, just make ur own 
lolno
But tbh, yea command handler libs do suck
Yep
LoL
how do you even use it
lol
The same thing with eris
Eris has a guide
No
What do you mean
The guide and examples are located at the repo not the website
What in the absolutely degenerative unknown to God fuck
I am not understanding
The same thing
95% of the time assume it's your fault and not the library's for not working
Pretty much
Wait, did this guy change the lib he was using just because he thought the lib was not working and he was having a simple issue?
Why not
Absolute pepega

Hhhhh
smol brain
Work on solving the issue instead of finding workarounds
-1head
I will use the lid that gonna help ma with my bit
good programmers are often just good at problem solving lol
I will not stop with one lib
I am using three lib in my bit
Bot*
Changing libs won't help you resolve your issues
yes
you know at this point do whatever you want
you will realise its dumb sooner or later
lol
Naah
Please solve this issue
Is this guy gonna change libs when he encounters a syntax error?
Hey I wanna do this
Don't do it it will bite you in the ass someday
finds themself in a bad situation
Oh no, who could have predicted this!
message.client.queue.delete(message.guild.id);
serverQueue.songs = [];
message.react("⏸")
}
},
};```
Yep
Smartass
when his bot doesn't boot up in a second you mean
this is for reaction
Get out
"But" moments before disaster

like join , leave
Do you think you're doing yourself a favor by doing all this shit
I am not delete the last lib from my bot
?
I am using three lib
This guy is just a tyler like hindsight mentioned
In the same project
Which libraries are you using
cya bye
Eris
Djs
Early
Damn I thought the same...
Are you stupid, retarded, autistic, or just have an attention span of a squirrel on drugs
@warped beacon Life is not that easy mate, its not like every error or problem you encounter will be resolved by changing libs or doing stupid shit like this
At this point I'm not throwing insults. I'm genuinely asking whether you have mental disorders that lead to this happening.
I swear, this channel makes me lose faith in humanity
Bro i want to do something stupid in my bot
Congrats you already did
-_-
Volt, bots don't have feelings
I feel bad for your bot
I am not understanding
Otherwise he'd already get cussed out to all unrecognizable hell
No thing have a feelings
But my bot name is feedings
So
Don't tempt me to go into psychology and philosophy
If Luca existed irl, he would slap this guy to another existence
🤣
😐 😐
So anyway
What's the actual issue
I kinda just appeared here when the shittalking started and moved along
😬 😬
Well if you're not gonna bother explaining the issue then I can't help those who are not willing to help themselves
Ahhh
Well I think they can't explain because they're not that good at speaking english (They're arabic), but you can use a translator at least
Oh right
Switching to java probably fixes the issue
Just switch to Minecraft command blocks bro
Automatically resolve errors
LMFAOOOOOOOOOO
ping
And what do you think people in here can do about it without any further infos?
lol
Bot is apparently just like its owner, responds late.
LOL
lmao
also like discord management
nah that's inept organization
this is just delay in response
You can't mix them up
LMAO
yeah true though
their discord server is messed up though
Full, proper recreation. Admirable.
oh
btw which language do you code in
or rather which one do you like to code in
Python usually, unless I feel like torturing my poor lazy brain with C#
...
i just like cleaner syntax
hey
how do i chech how many servers my bot is in and stuff
client.guilds.cache.size for discord,js
That's the code for showing how many servers your bot is in
"console.log(client.guilds.cache.size)" in your ready event
Yes, without the "
Yes
do i put it in the shell
Yes, paste it in your ready event block
bruh learn basic javascript
ok
or read the discord.js docs
thats all it saud
@split cipher
Put it in your
"client.on('ready', () => {
// put code here
})
That's the ready event
?
Hard to explain, you should read the discord js doc xp
The error is unrelated to this because the errors says it cannot read the index.is file
My phone autocorrected it, couldnt be bothered editing the message
You renamed the index.js to "main.js" and didn't update the package.json to reflect that change - that's your problem.
Hello
Who knows change link names
I want to do click button for a link
How can i do
This is a command for my question but i can not do taht correctly @wary orbit
Hello
Hi
sad
hey i can help u with that
well if u can deal with the border and the size i cn help orelse i hv to help u with that lo
Umm ok
only with embeds ^^^
How canni sue this command
No i dont use html
then i cant help u sorry
what should i do if i used
u wud do
<a href="https://discord.com/oauth2/authorize?client_id=819883229565812757&permissions=523328&scope=bot"<button type="button" class="btn btn-lg btn-primary" disabled>Add Bot</button>
lemme show u how that wud be
btw the link
it shud be ur link
to ur bot or whatevrr
Hello everyone, it is definitely the most asked question that I am definitely asking here. Nevertheless, I put it up, how is that done with the vote. I have a global chat bot that communicates via several servers. And would like to use it in the chat to always show who is voting. Who has what in stock? My bot is written in Python 
hm

thats a bit specific pal
so basically u wanna keep track of how many votes a user has
indeed
late response, but tks
How can i do click button for a link with this command
Extra late
hey pal use html. its simple
lol well yea
but this server is all the way at the bottom for me
i made this in less than 5 min - see how simple it is.
and im in 100 servers
html is what u gotta use
@vale garden i liked your profile ;)
so ofc i saw the ping quitee late
How do I add a rich presence on python
whats the api endpoint to publish a news article in an announcements channel?
hey i wanna try this
If I have the string: Welcome {user.name} to the server.
and I want to replace {user.name} with the variable member how would I do that?
what lang?
javascript
that should work
yeah, depending on what member is
just make sure wmsg is a string
Hello guys! Is there anyway to make what's app bot without getting banned...?
Not sure what you mean
good luck
whatsapp doesnt have a free api
and if you're talking about copyrighted names you'll only be declined from dbl
discord doesnt give two shits
sa
what are other fields i can add? like i have the name pfp and date, how do you get the past usernames that person had or other things
Pretty sure Discord doesn't have a way to check previous names, you'd have to store them yourself
https://discordpy.readthedocs.io/en/latest/api.html#id7
You can check this to see all attributes discord.User has
ty


Whit's is the best?
It's up to you, they all have their pros and cons
Just look through them and decide which one you like the best
Some have cheap prices, some have good uptime, some have good specs. Again, they all have ups and downs
Mate, just pick the one you like
If you only care about having it online 24/7, go for the cheapest one ig
OK
any feedback https://zero-one.xyz ?
(for web page i mean)
Where i add my bot in hostmyservers?
Where i add my bot in hostmyservers?
thanks
is vps ssd nvme?
ssd nvme is just the storage type
do you know where?
Where what?
in hostmyservers where i add my bot
Well, you probably need to use FTP to transfer your bot's files to the VPS, and then SSH into it to start the script
You should understand that by buying a VPS you are basically renting a computer
which is always online
So you don't just add your bot to some site
let me introduce you to this thing called git
.then(response => {
fetch('https://discordapp.com/api/users/@me', {
method: 'GET',
headers: {
authorization: `${response.token_type} ${response.access_token}`
},
})
.then(res2 =>res2.json())
.then(userResponse => {
console.log(userResponse)
userResponse.tag = `${userResponse.username}#${userResponse.discriminator}`;
userResponse.avatarURL = userResponse.avatar ? `https://cdn.discordapp.com/avatars/${userResponse.id}/${userResponse.avatar}.png?` : null;
userhit(userResponse)
req.session.user = userResponse;
});
fetch('https://discordapp.com/api/users/@me/guilds', {
method: 'GET',
headers: {
authorization: `${response.token_type} ${response.access_token}`
},
})
.then(res2 => res2.json())
.then(gResponse => {
req.session.guilds = gResponse;
res.redirect('/manage');
});
});
});
i am working on a dashboard and for some reason userResponse comes out as undefined
wait nope it comes out as ```js
{ message: '401: Unauthorized', code: 0 }
console log response and see if it's returning actual data and not an error
authorization: `Bearer ${response.token_type} ${response.access_token}
response.token_type is already Bearer
oh ok
HEaders are case insenstivie, right?
I think so
LOOK AT THAT. EXPANDING CODE
nice
ew Lua
Ignore the fact that it's Lua you derp, it's EXPANDABLE FILE UPLOADS
finally. Discord did it.
yeah it's great
took some time
yeah finally time to ditch the bin sites
uwu, whats this new update
owo what's this expands your file
That is pretty literally the most useful programming-related update Discord has done in its entire history
(client-wise, not api-wise)
do you just upload the file?
YEah
pog
i never realized how much i wanted this new feature until i just saw it
This is so great
so people can now just dump their file here? 👀
doesnt really help with the average repl user
It definitely helps the average person that wants help with a large file. no more paste.gg
i hope they add it for regular code blocks as well, would be so useful
I mean if you end up dropping a large codeblock it just shows that window for a file.
So you just use this when dropping large code
¯_(ツ)_/¯
well in theory they could still have the same 2000 character limit but just show the same window as above (limit it to some number of lines)
Anyone attempting to paste a large codeblock will be using this, whether they want to or not.
This literally is a "preview for message.txt attachment" and it's automatically applied so... yeah we're good.
oh
ohhhhh
heck yes
discord did it right
not that im here much recently anyway
why would user ids be coming in with this format <@ID> instead of like this <@!ID>
I thought the ! in <@!> is deprecated.
it can still be sent sometimes, but it was just for nicknames or something?
Yeah, I think <@!> is if they have a nickname in the server
Roles is <@&ID> iirc
was ! deprecated though? or am i making that up
thanks, i'll check for both <@id> and <@!id> to make sure i get both formats
It is
Is it though? I've seen it really recently
its still sent, but its not reliably used.
Yeah, it's kinda unstable
@marble juniper bro can you help me
my music cammand is not working
idk why
Is there any way to refresh auth.Since if a user had got perms removed but is still logged in.The perms does not get updated sadly :c
you need to give me code here
bro yestoday is worked
no
jesus
thats ur commands
its all commands
thats a lot of files
yeah
what about ur index file
jeez people these days are late for new features
bruh
@marble juniper Bro iam sending the error
I said im not helping you
If I have
client.on('guildMemberAdd', member)
``` event how would I assign a role to the member?
member.addrole did not work.
see
member.roles.add("roleid")
ok
Is that a v12 thing?
to use the api again
yes rip
Ah, yea I am trying to move a v11 bot into v12.
lol
read this
for upgrading from v11 to v12
That worked thanks. 🙂
Thanks that will be very useful.
nobody❓
what do you mean by refresh auth
refresh the token?
also seems like you have a major security exploit
always check if the user is in the guild in the backend
what would i use for the bot? i want it to send something different when the bot who's code is this is the member mentioned
if ctx.member == discord.Bot?
though that would mean all bots
or would that work?
From what I understand, you're trying to detect if the member is a bot (correct me if I'm wrong). To do so, your if condition could just be ctx.author.bot. The bot attribute of the ctx.author object is a Boolean (whether the member is a bot or not).
ctx.author not member
im trying to find if the member that was mentioned is the bot itself
if member.id == self.bot.user.id
or
Probably works without .id
if ctx.author.me ?
Okay, then shivaco's reponse (#development message) would be correct. Your condition would be ctx.author.id == self.bot.user.id.
No
ctx.guild.me gets the bot's member version in the guild
but member is already defined as the mentioned person and wouldn't ctx.author get the user that called the command?
Correct
Apologies, yes, you are correct. It should be exactly what shivaco said.

so what do i need to code a bot? or to make a bot?
what language are you planing to use?
English
thats the best answer anyone has ever sent here
i mean like coding languages; python, js, c, c++
I would recommend js or python for beginners
mhm
i am new to coding so try to be ez on me
what does js mean?
Short for Javascript
oh
Its a type of coding language
i think there might be more instruction videos on python but idk
wait just to make this is 100% legal right?
yes
being a developer is legal, yes ^_^
idk
I don't know what would be illegal about a coding language
You would probably need a base-level understanding of a programming language, and some time and effort
what if programming became a crime
nooo
rip all internet, and computers
tru
Then the world would go back to monke times
I wonder how long the internet would last tbh
Get on the deep web to download Visual Studio Code
programmers become labeled as hackers a persecuted like witches
deep web?
welcome to the new dark ages
No that was a joke, don't go there
i bet things would still be around for 6 months, then everything becomes hackable ^_^
true
SSN will be all over the place
there will be no electricity so literally yea
somebody synced a RAT to our servur.. a-a- remote access tool
so what do i need to make a bot
Knowledge within programming
learn to program, i think one of the pins has some sources.
pick a language first
ok
that is a good programing lanuage
@verbal vault If you want to start coding a Discord bot, I would recommend getting a basic understanding of coding and how everything works, and choosing a language you want to use before you start. Use some online classes or videos to learn instead of just asking "how do i code a discord bot" in a Discord server.
definitely not videos
you'll just end up copypasting and trying to figure out what they typed out
i like videos for concepts, not actual coding.
like learning how x works, great for video. learning how to make y? bad for videos.
If you are still in school, maybe take some sort of Computer Tech or coding class there if they have them
thats how i learned 😂
i don't feel very stuck ive been coding for a month
^
fuck off
still, its better than just asking some random people
dont post ads 😠
haha yea
also also
i was never here
wait how much will class cost me?
If it's at a public school or something, usually $0
depends
hello lads
programming requires good logical problem solving skills, if you can't find yourself doing that it's very suggested you don't get into programming in the first place because it's not meant for you
does anyone have an idea how you can properly pass an object from a ShardingManager file to a shard file
tru
well i am free all day and have nothing to do
it's a skill like any other though, you can practice and do brain exercises
If you want to start learning, I wouldn't recommend having people here spoon-feeding you everything you need to know, it won't be very effective. Start somewhere else
so what age should i get into it?
Age doesnt matter that much
Think of it like learning anything else, like playing the guitar.
you just have to start
oh like that
You can't go into a guitar store and say "hey! teach me to play through the fire and flames!"
It's better to start with the basics and work your way towards the goal
any sharding gods around?
srry idk how 😓
IF you're free all day and nothign to do, following programming classes online on your own is super easy
what bot did u make?
I made a tag bot - pretty boring
I made a fairly small multi-purpose bot
i mean like this
im coding a lemon bot 🤣 it can do some cool stuff
That's a thing you cannot get anymore.
That just means that their bot was verified by discord
It means I verified my bot early 😛
so what bots was that?
wow cool
can you send me a link ? i wanna see it
lol
been in discord for some time now 2019 to now and still dont know how to use that
I'm not gonna start advertising my things, if you're curious, figure it out.
tell me
ok
Hoist status of a role
role.hoist is whether or not the role has the "Display role members seperately from online members" setting enabled
Aka whether it's sepa-
no problem
You guys use watch2gether? (asking for my bot)
no
does anyone have an idea how you can properly pass an object from a ShardingManager file to a shard file
you have to stringify it
Can anybody tell me why my bot does not appear in the users list? The bot is online and it's status is online aswell.. also the bot doesn't respond to any commands.. this happend after I changed permissions in the oauth invite link
Does it have permission to view the channel you're trying to use it in?
Yes it has the permission
Then it should appear in the member list as well, unless you somehow kicked it from the server
Wouldn't the bot reappear in the user list after I invited it again?
Yeah, it would.
Only if it has perms to view the channel you're looking at
Well.. for test I had the oauth permission on Administrator.. now I changed the perms kicked the bot and reinvited with new permissions but the bot does not appear in the user list
Hm.
oh okay, how do you still send it oops
I think its just you.
these are the permissions
Looks fine, did you try creating a new channel and see if the bot appears in that?
Try checking the server permissions
Oh in the new channel the bot is appearing in the user list
Haha
Then the bot most likely doesn't have perms to view the old channel for whatever reason :)
Probably was just the sever channel permissions you put or smth.
is it possible to get the application's publickey through a djs bot client
Okay 😄 Thanks for helping ^^
I think so, not really sure tho.
oh okay
update to v12
uninstall djs, reinstall and migrate your code
under section upgrading to v12
What would be the permission for this?
Pretty sure it's just this one, but you should enable "Send Messages" as well
omggg








