How to Make Your Own Discord Bot77

Head over on your terminal, and run the following command:

Nodemon –Look Into Index.js

This starts offevolved up the script, and also fires up the Chrome debugger, which you could get right of entry to by using typing chrome://check out/  into Chrome’s Omnibar and then commencing “devoted devtools for Node.”

Now, it must Discord bot say “Logged in as <bot-name>,” however right here I’ve delivered a line in order to log all message items acquired to the console:

So what makes up this message item? a whole lot of stuff, honestly:

Most notably, you have got the writer information and the channel info, which you could get entry to with msg.writer and msg.channel. I endorse this method of logging objects to the Chrome Node devtools, and just searching round to look what makes it work.

You can locate some thing exciting. here, for example, the bot logs its replies to the console, so the bot’s replies cause consumer.on(‘message’). So, I made a spambot:

The way to add the Bot for your Server

This part is more difficult than it should be. you need to take this URL:

https://discordapp.com/oauth2/authorize?client_id=CLIENTID&scope=bot

And replace CLIENTID together with your bot’s patron identity, determined on the overall records tab of the software page. once that is achieved even though, you may deliver the link for your pals to have them add the bot to their servers as well.

This entry was posted in Business. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *