Need help Looking to build a Discord bot using JavaScript, but where do I start?

Malcolm

Administrator
Administrator
Jan 2, 2018
549
115
55
Canada
codeforum.org
Hello Coders!

I'm looking to start building a Discord bot for my Discord channel and was wondering where do I start? And, what do I need to have before I start? Is there anything I need to keep in mind?

I'm developing a Discord bot for Code Forum's discord channel and want it to be helpful.

Cheers!
 

Tret

New Member
Apr 23, 2019
10
8
4
I recently created a Discord bot using python with the aid of a youtube tutorial by DevDungeon, as well as a few written tutorials and reading through documentation. I also noticed they uploaded a tutorial for JavaScript, but haven't watched it as I don't use that coding language. Perhaps that or the written tutorial linked from their video could be of some help? I found it particularly useful that they made a video tutorial as well as a written one, but my main issue with it was, for python at least, they were using an outdated package and some documentation has changed since then. Link to video here

 
Last edited by a moderator:
  • Like
Reactions: Malcolm and CoreyJ

CoreyJ

New Member
May 8, 2019
5
2
4
I recently created a Discord bot using python with the aid of a youtube tutorial by DevDungeon, as well as a few written tutorials and reading through documentation. I also noticed they uploaded a tutorial for JavaScript, but haven't watched it as I don't use that coding language. Perhaps that or the written tutorial linked from their video could be of some help? I found it particularly useful that they made a video tutorial as well as a written one, but my main issue with it was, for python at least, they were using an outdated package and some documentation has changed since then. Link to video here

I had the same video and was about to post it lol
 
  • Like
Reactions: Tret

Malcolm

Administrator
Administrator
Jan 2, 2018
549
115
55
Canada
codeforum.org
I recently created a Discord bot using python with the aid of a youtube tutorial by DevDungeon, as well as a few written tutorials and reading through documentation. I also noticed they uploaded a tutorial for JavaScript, but haven't watched it as I don't use that coding language. Perhaps that or the written tutorial linked from their video could be of some help? I found it particularly useful that they made a video tutorial as well as a written one, but my main issue with it was, for python at least, they were using an outdated package and some documentation has changed since then. Link to video here

Thanks @Tret! I’ll check it out when I get home! :)
 
  • Like
Reactions: Tret

Ghost

Member
Apr 19, 2019
50
33
18
You will need to use Node.js, which is able to interpret all of the messages sent & do things in return.
The essentials are this...
  • Learn how to read incoming messages to the Discord server
  • Filter messages / target messages that use a command or text that should trigger your bot
  • Prepare the bot response
  • Learn how to send a message to the Discord server
In JavaScript this is all very easy, and using Node.js isn't too hard either, but will definitely require some tutorials or guidance even if you know core JS already.
You can do a lot with Node.js though, and once you learn the Discord API you can learn other networks like Reddit, Facebook, Twitter and more to create other bots.
 
  • Like
Reactions: Malcolm

Malcolm

Administrator
Administrator
Jan 2, 2018
549
115
55
Canada
codeforum.org
You will need to use Node.js, which is able to interpret all of the messages sent & do things in return.
The essentials are this...
  • Learn how to read incoming messages to the Discord server
  • Filter messages / target messages that use a command or text that should trigger your bot
  • Prepare the bot response
  • Learn how to send a message to the Discord server
In JavaScript this is all very easy, and using Node.js isn't too hard either, but will definitely require some tutorials or guidance even if you know core JS already.
You can do a lot with Node.js though, and once you learn the Discord API you can learn other networks like Reddit, Facebook, Twitter and more to create other bots.
Awesome thanks @Ghost Ill look into this! I got one working but understanding how and what certain functions are