Skip to content
Permalink
Browse files

travis test?

  • Loading branch information
zapteryx committed Jul 5, 2019
1 parent 6703f51 commit e0ae5e4a47ddbeda8a3a721300ad1856c924cba5
Showing with 13 additions and 0 deletions.
  1. +1 −0 .travis.yml
  2. +12 −0 bot.js
@@ -0,0 +1 @@
language: node_js
12 bot.js
@@ -64,6 +64,8 @@ function getBar(progress) {
else if (progress < 100) {return "◻◻◻◻◻◻◻◻◻◼";}
else {return "◻◻◻◻◻◻◻◻◻◻";}
}
function noCache(module) {require("fs").watchFile(require("path").resolve(module), () => {delete require.cache[require.resolve(module)]})}
var test = require('modules/test.js')

bot.on("connect", (id) => {
bot.createMessage("587916017976475648", "Shard #" + id + " has started a connection.");
@@ -93,4 +95,14 @@ bot.on("shardResume", (id) => {
bot.createMessage("587916017976475648", "Shard #" + id + " has resumed.")
})

bot.on("messageCreate", (msg) => {
text = msg.content.split(" ");
if (msg.author.id == "191739936871809024" && text[1] == "/eval") {
evalQuery = msg.content.split(text[0]);
finalQuery = evalQuery.join(" ");
try {evaled = eval(finalQuery).toString(); bot.createMessage(msg.channel.id, "**Success!** Output:\n```js\n" + evaled + "```");}
catch (err) {bot.createMessage(msg.channel.id, "**Error!** Output:\n```js\n" + err.toString() + "```");}
}
})

bot.connect()

0 comments on commit e0ae5e4

Please sign in to comment.
You can’t perform that action at this time.