diff --git a/.gitignore b/.gitignore index 100aec0..715d005 100644 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,5 @@ jspm_packages # Output of 'npm pack' *.tgz + +/config.json diff --git a/feed-bot.js b/feed-bot.js new file mode 100644 index 0000000..4c6c115 --- /dev/null +++ b/feed-bot.js @@ -0,0 +1,21 @@ +var Discord = require("discord.io"); +var Config = require("./config.json"); +var console = require("console"); + +var bot = new Discord.Client({ + token: Config.token, + autorun: true +}); + +bot.on("ready", function () { + console.log(bot.username + " - (" + bot.id + ")"); +}); + +bot.on("message", function (user, userID, channelID, message) { + if (message === "ping") { + bot.sendMessage({ + to: channelID, + message: "pong" + }); + } +}); \ No newline at end of file