Skip to content

Commit

Permalink
Added command !code to send a message to the channel with this reposi…
Browse files Browse the repository at this point in the history
…tory
  • Loading branch information
CodeSpent committed Sep 29, 2018
1 parent 2128fcc commit d764f93
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"token" : "Add Your Key",
"token" : "YourKey",
"prefix" : "!"

}
21 changes: 20 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
});



0 comments on commit d764f93

Please sign in to comment.