Learn to code a Discord bot with JavaScript using Node.js.
π Written Tutorial – https://www.devdungeon.com/content/javascript-discord-bot-tutorial
π Unicode Emojis – https://unicode.org/emoji/charts/full-emoji-list.html
π Official Documentation – https://discord.js.org
Tutorial by Dev Dungeon. Check out their YouTube channel: https://www.youtube.com/channel/UCgkG68BiCngkoV7I2BLtAVg
—
Learn to code for free and get a developer job: https://www.freecodecamp.org
Read hundreds of articles on programming: https://medium.freecodecamp.org
And subscribe for new videos on technology every day: https://youtube.com/subscription_center?add_user=freecodecamp
source
finally i also know to code a bot
7:58 I try to run it but it comes up as "discord not defined"
nothing happend when i did node my-bot.js
If you encountered an error with npm install discord.js press ctrl + r and type where npm. After that restart your computer and you should be all set!
My bot won't even come online. It does nothing. I have all the correct programs installed and updated but nothing works.
I've been following his code to a tee and it comes back with an error "Unexpected end of input"….
So uh idk if this is still valid but great vid I donβt have a computer tho so yea
It just says: 'MODULE_NOT_FOUND'
10:15 client.guilds.cache.forEach()
10:44 guild.channels.cache.forEach()
12:00 let generalChannel = client.channels.cache.get()
12:40 const attachment= new Discord.MessageAttachment()
18:36 let customEmoji=recievedMessage.guild.emojis.cache.get()
i am facing error saying forEach is not a funtion
Can I have the discord link cause the one that you showed is not working and when I was trying to code with node it shows an error.
When Im writing node.js, there is no message being displayed…moreover the bot is not going online…please help me out
Thanks for the video… Links aren't working please
it doesen't get online i wrote all letters
how to make looping i try some code. its run only one time.
Mcafee is blocking installation of node js saying somebody is trying to hijack your computer
I have a problem, i don't see cdm anywhere, there is just powershell.
It hasnβt worked for me I canβt get it online.
it doesnt work for me when i use clients.guilds.forEach()
it doesnt set the activity for me or send hello world or show me all the servers its in, please help
i currently have a custom dice app that i want to integrate into a discord bot. is there a way to link said diceapp to a bot so i don't have to rewrite code?
I made it up to 8:16 before encountering a problem. My bot connected but didn't appear in my discord channel on the right side bar as either ONLINE or OFFLINE. The system did say "My Awesome Bot just landed." But when I try to @ my bot, she (my bot is a girl) is not available as a selectable member.
Node version is 12.16.3
What did I miss?
TYSM
you not using semi-colons makes me angry and I dont know why
Bruh everything different in 2021 it outdated how to fix help π
For some unknown reason, when I try to use “client.channels.get“ I get the error "client.channels.get is not a function", with an arrow specifying that “get“ is causing that, what's the way behind that?
i need help when i ran the "node my_bot.js" it did nothing and i had no warning or anything
Note for all devs watching this video in 2020-2021:
please put .cache after .guilds or .guild.<whatever>.cache
discord has updated this so you might run into errors if you don't put it
When i start doing it it shows that unexpected token '-'…How do we fix it?
TypeError: client.guilds.forEach is not a function.
The entire portion of the video that deals with forEach doesn't work anymore.
i got an errors here 5:55
My code at 7:58 doesn't work. I tried everything u said in the vid as well as the comments.
HELP!
having trouble with .send around the 12 minute mark, any ideas?
how to get that channel id ? 11.45
i have this error and i don't know how to fix it
Error:
throw new TypeError('CLIENT_MISSING_INTENTS');
^
TypeError [CLIENT_MISSING_INTENTS]: Valid intents must be provided for the Client.
at Client._validateOptions (C:DiscordBotnode_modulesβ[4mdiscord.jsβ[24msrcclientClient.js:544:13)
at new Client (C:DiscordBotnode_modulesβ[4mdiscord.jsβ[24msrcclientClient.js:73:10)
at Object.<anonymous> (C:DiscordBotbot.js:2:16)
β[90m at Module._compile (node:internal/modules/cjs/loader:1101:14)β[39m
β[90m at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)β[39m
β[90m at Module.load (node:internal/modules/cjs/loader:981:32)β[39m
β[90m at Function.Module._load (node:internal/modules/cjs/loader:822:12)β[39m
β[90m at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)β[39m
β[90m at node:internal/main/run_main_module:17:47β[39m {
[β[32mSymbol(code)β[39m]: β[32m'CLIENT_MISSING_INTENTS'β[39m
}
π
I try to do "node my_bot.js" but it comes up with "TypeError [CLIENT_MISSING_INTENTS]: Valid intents must be provided for the Client" why?
I keep getting this error, what do i do?
C:UsersEnderDesktopmy_botnode_modulesdiscord.jssrcclientClient.js:544
throw new TypeError('CLIENT_MISSING_INTENTS');
^
TypeError [CLIENT_MISSING_INTENTS]: Valid intents must be provided for the Client.
at Client._validateOptions (C:UsersEnderDesktopmy_botnode_modulesdiscord.jssrcclientClient.js:544:13)
at new Client (C:UsersEnderDesktopmy_botnode_modulesdiscord.jssrcclientClient.js:73:10)
at Object.<anonymous> (C:UsersEnderDesktopmy_botmy_bot.js:2:16)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:17:47 {
[Symbol(code)]: 'CLIENT_MISSING_INTENTS'
}
my bot are not connect with my code.i mean cannot find module