summaryrefslogtreecommitdiff
path: root/bot.js
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-04-17 19:02:23 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2017-04-17 19:02:23 +0200
commit7aa7a45e3f46fd1bc3a965c0c4a40bded288d7a8 (patch)
treeead9bdbd19b2c93e8f0eeb7390fe5518665f9a46 /bot.js
parent3194e700332987e5cdd3e026bad930fc87dfd245 (diff)
downloaddiscordbot-7aa7a45e3f46fd1bc3a965c0c4a40bded288d7a8.tar.gz
discordbot-7aa7a45e3f46fd1bc3a965c0c4a40bded288d7a8.zip
it's done
Diffstat (limited to 'bot.js')
-rw-r--r--bot.js17
1 files changed, 13 insertions, 4 deletions
diff --git a/bot.js b/bot.js
index 8b18d20..a7bd8e5 100644
--- a/bot.js
+++ b/bot.js
@@ -2,14 +2,20 @@
/* jshint esnext:true */
"use strict";
+const PREVIEW = process.env.PREVIEW || true;
+
const sqlite = require("sqlite"),
path = require("path"),
Commando = require("discord.js-commando"),
oneLine = require("common-tags").oneLine,
client = new Commando.Client({
- owner: "227440521704898561", // shutterfly
- commandPrefix: "?"
- });
+ owners: ["227440521704898561", "208974925199966208"],
+ // shutterfly, stormcaller
+ commandPrefix: (PREVIEW? "?" : "!"),
+ invite: "https://discord.gg/txTchJY",
+ unknownCommandResponse: false
+ }),
+ responses = require("./responses");
const DISCORD_TOKEN = process.env.DISCORD_TOKEN;
@@ -52,7 +58,10 @@ client
${enabled ? 'enabled' : 'disabled'}
${guild ? `in guild ${guild.name} (${guild.id})` : 'globally'}.
`);
- });
+ })
+
+ // response reaction interface
+ .on("messageReactionAdd", responses.onNewReaction);
client.setProvider(
sqlite.open(path.join(__dirname, "settings.sqlite3")).then(