From 732fa79b7ed05b0010384e74462d0199451d2723 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Tue, 9 May 2017 17:07:49 +0000 Subject: [PATCH] Oops --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 65204c17..ace6db82 100644 --- a/index.js +++ b/index.js @@ -23,6 +23,8 @@ const clevs = new Cleverbot({ nick: 'XiaoBot' }); +let mention; + client.setProvider(new SequelizeProvider(Database.db)); client.registry @@ -45,7 +47,6 @@ client.registry .registerDefaultCommands({ help: false }) .registerCommandsIn(path.join(__dirname, 'commands')); -const mention = new RegExp(`()`, 'g'); client.on('message', async (msg) => { if (msg.isMentioned(client.user)) { const message = msg.content.replace(mention, ''); @@ -141,6 +142,7 @@ client.on('disconnect', (event) => { client.on('ready', () => { console.log(`[Ready] Shard ${client.shard.id} Logged in!`); client.user.setGame(`x;help | Shard ${client.shard.id}`); + mention = new RegExp(`()`, 'g'); }); client.login(TOKEN);