diff --git a/main.js b/main.js index 8306981..a93a16b 100755 --- a/main.js +++ b/main.js @@ -5,6 +5,7 @@ const tokens = require('./tokens.json'); const client = new Client(); const sfxFilePath = path.join(__dirname, 'sfx'); +const allowedChannels = /bot|alttp-alerts/; let playOptions = {volume: 0.25, passes: tokens.passes}; let playing = false; @@ -72,7 +73,7 @@ client.on('ready', () => { }); 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]; if (commands.hasOwnProperty(cmd)) commands[cmd](msg); }); diff --git a/sfx/bossmusic.mp3 b/sfx/bossmusic.mp3 old mode 100644 new mode 100755 index e36c68a..441f22c Binary files a/sfx/bossmusic.mp3 and b/sfx/bossmusic.mp3 differ diff --git a/sfx/emetarage3.mp3 b/sfx/emetarage3.mp3 new file mode 100755 index 0000000..2d48ab5 Binary files /dev/null and b/sfx/emetarage3.mp3 differ diff --git a/sfx/english.mp3 b/sfx/english.mp3 new file mode 100755 index 0000000..d835961 Binary files /dev/null and b/sfx/english.mp3 differ diff --git a/sfx/fiesta.mp3 b/sfx/fiesta.mp3 deleted file mode 100644 index bac4621..0000000 Binary files a/sfx/fiesta.mp3 and /dev/null differ diff --git a/sfx/help.mp3 b/sfx/help.mp3 new file mode 100755 index 0000000..5471c13 Binary files /dev/null and b/sfx/help.mp3 differ diff --git a/sfx/like.mp3 b/sfx/like.mp3 new file mode 100755 index 0000000..80614ad Binary files /dev/null and b/sfx/like.mp3 differ diff --git a/sfx/mad.mp3 b/sfx/mad.mp3 new file mode 100755 index 0000000..033b5f4 Binary files /dev/null and b/sfx/mad.mp3 differ diff --git a/sfx/massage.mp3 b/sfx/massage.mp3 new file mode 100755 index 0000000..f63a581 Binary files /dev/null and b/sfx/massage.mp3 differ diff --git a/sfx/porkchop.mp3 b/sfx/porkchop.mp3 new file mode 100755 index 0000000..a72d2a8 Binary files /dev/null and b/sfx/porkchop.mp3 differ diff --git a/sfx/stick.mp3 b/sfx/stick.mp3 new file mode 100755 index 0000000..309bd17 Binary files /dev/null and b/sfx/stick.mp3 differ diff --git a/sfx/store.mp3 b/sfx/store.mp3 new file mode 100755 index 0000000..8b7ac76 Binary files /dev/null and b/sfx/store.mp3 differ diff --git a/sfx/wiki.mp3 b/sfx/wiki.mp3 new file mode 100755 index 0000000..b987d55 Binary files /dev/null and b/sfx/wiki.mp3 differ diff --git a/sfx/xelboss.mp3 b/sfx/xelboss.mp3 new file mode 100755 index 0000000..bacd8b7 Binary files /dev/null and b/sfx/xelboss.mp3 differ