allow more channels for testing
This commit is contained in:
3
main.js
3
main.js
@@ -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
BIN
sfx/bossmusic.mp3
Normal file → Executable file
Binary file not shown.
BIN
sfx/emetarage3.mp3
Executable file
BIN
sfx/emetarage3.mp3
Executable file
Binary file not shown.
BIN
sfx/english.mp3
Executable file
BIN
sfx/english.mp3
Executable file
Binary file not shown.
BIN
sfx/fiesta.mp3
BIN
sfx/fiesta.mp3
Binary file not shown.
BIN
sfx/help.mp3
Executable file
BIN
sfx/help.mp3
Executable file
Binary file not shown.
BIN
sfx/like.mp3
Executable file
BIN
sfx/like.mp3
Executable file
Binary file not shown.
BIN
sfx/mad.mp3
Executable file
BIN
sfx/mad.mp3
Executable file
Binary file not shown.
BIN
sfx/massage.mp3
Executable file
BIN
sfx/massage.mp3
Executable file
Binary file not shown.
BIN
sfx/porkchop.mp3
Executable file
BIN
sfx/porkchop.mp3
Executable file
Binary file not shown.
BIN
sfx/stick.mp3
Executable file
BIN
sfx/stick.mp3
Executable file
Binary file not shown.
BIN
sfx/store.mp3
Executable file
BIN
sfx/store.mp3
Executable file
Binary file not shown.
BIN
sfx/wiki.mp3
Executable file
BIN
sfx/wiki.mp3
Executable file
Binary file not shown.
BIN
sfx/xelboss.mp3
Executable file
BIN
sfx/xelboss.mp3
Executable file
Binary file not shown.
Reference in New Issue
Block a user