Simple Coding For A Discord Bot!


SUBMITTED BY: Bingo92707

DATE: July 7, 2016, 12:16 p.m.

FORMAT: Text only

SIZE: 713 Bytes

HITS: 858

  1. HAVE TO HAVE Node.js & Discord.js
  2. Code:
  3. var Discord = require("discord.js");
  4. var bot = new Discord.Client({autoReconnect: true});
  5. bot.on("message", function(message)
  6. {
  7. var input = message.content.toUpperCase();
  8. //Command Below (U Can Copy & Paste & Change The Input But Input Must Be In Caps!)
  9. if (input === "INPUT HERE") {
  10. bot.reply(message, "WHAT YOU WANT BOT TO SAY HERE");
  11. }
  12. });
  13. // This tells u if the bot is on in console
  14. bot.on('ready', function () {
  15. console.log(bot.username + " - (" + bot.id + ")");
  16. Object.keys(memes).forEach(function (i) {
  17. regexs[i] = new RegExp(i)
  18. });
  19. });
  20. //put your bots login token here
  21. bot.loginWithToken("TOKEN HERE!")

comments powered by Disqus