repl.it
@ChristopherRoch/

Discord Bot Submission

Nodejs

My submission for the Repl.it bot competition!

fork
loading
Files
  • index.js
  • commands
  • Packager files
  • package-lock.json
  • package.json
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
const Commando = require('discord.js-commando');

const bot = new Commando.Client({
  commandPrefix: '?'
});
const TOKEN = process.env.DISCORD_BOT_SECRET;


bot.registry.registerGroup('simple', 'Simple');
bot.registry.registerGroup('urban_dictionary', 'Urban Dictionary');
bot.registry.registerGroup('admin', 'Admin');
bot.registry.registerGroup('dice', 'Dice');
bot.registry.registerCommandsIn(__dirname + '/commands');

bot.on('message', function (message) {

});

bot.on('ready', function () {
  console.log('Ready!');
});

bot.login(TOKEN);
?