diff --git a/config.json b/config.json index e1f27c7..be4190d 100644 --- a/config.json +++ b/config.json @@ -1,5 +1,5 @@ { - "token" : "Add Your Key", + "token" : "YourKey", "prefix" : "!" } \ No newline at end of file diff --git a/index.js b/index.js index 23a781e..2f51a78 100644 --- a/index.js +++ b/index.js @@ -47,7 +47,26 @@ setInterval(function() { .catch(console.error); }, 30000) -}) +}); + +bot.on('message', async message => { + if(message.author.bot) return; + + let prefix = config.prefix; + let messageBody = message.content.split(" "); + let command = messageBody[0]; + + + if(command == `${prefix}code`){ + let repo = new Discord.RichEmbed() + .setDescription("Stats Bot Repository") + .setColor("#00FF00") + .addField("Github", "https://github.com/CodeSpent/discord-stats"); + + + return message.channel.send(repo); + } +});