allow more channels for testing

This commit is contained in:
Chris Ham
2017-07-25 11:26:44 -07:00
parent 1bb176bcc0
commit 0917e8929e
14 changed files with 2 additions and 1 deletions

View File

@@ -5,6 +5,7 @@ const tokens = require('./tokens.json');
const client = new Client(); const client = new Client();
const sfxFilePath = path.join(__dirname, 'sfx'); const sfxFilePath = path.join(__dirname, 'sfx');
const allowedChannels = /bot|alttp-alerts/;
let playOptions = {volume: 0.25, passes: tokens.passes}; let playOptions = {volume: 0.25, passes: tokens.passes};
let playing = false; let playing = false;
@@ -72,7 +73,7 @@ client.on('ready', () => {
}); });
client.on('message', msg => { client.on('message', msg => {
if (!msg.content.startsWith(tokens.prefix)) return; if (!allowedChannels.test(msg.channel.name) || !msg.content.startsWith(tokens.prefix)) return;
let cmd = msg.content.toLowerCase().slice(tokens.prefix.length).split(' ')[0]; let cmd = msg.content.toLowerCase().slice(tokens.prefix.length).split(' ')[0];
if (commands.hasOwnProperty(cmd)) commands[cmd](msg); if (commands.hasOwnProperty(cmd)) commands[cmd](msg);
}); });

BIN
sfx/bossmusic.mp3 Normal file → Executable file

Binary file not shown.

BIN
sfx/emetarage3.mp3 Executable file

Binary file not shown.

BIN
sfx/english.mp3 Executable file

Binary file not shown.

Binary file not shown.

BIN
sfx/help.mp3 Executable file

Binary file not shown.

BIN
sfx/like.mp3 Executable file

Binary file not shown.

BIN
sfx/mad.mp3 Executable file

Binary file not shown.

BIN
sfx/massage.mp3 Executable file

Binary file not shown.

BIN
sfx/porkchop.mp3 Executable file

Binary file not shown.

BIN
sfx/stick.mp3 Executable file

Binary file not shown.

BIN
sfx/store.mp3 Executable file

Binary file not shown.

BIN
sfx/wiki.mp3 Executable file

Binary file not shown.

BIN
sfx/xelboss.mp3 Executable file

Binary file not shown.