Improve soundboard and dec-talk

This commit is contained in:
Daniel Odendahl Jr
2018-10-15 14:35:41 +00:00
parent e78d6c94e5
commit fd361e4cc5
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -17,15 +17,14 @@ module.exports = class SoundboardCommand extends Command {
usages: 1,
duration: 10
},
userPermissions: ['CONNECT', 'SPEAK'],
clientPermissions: ['ADD_REACTIONS', 'READ_MESSAGE_HISTORY'],
args: [
{
key: 'sound',
prompt: `What sound would you like to play? Either ${list(Object.keys(sounds), 'or')}.`,
type: 'string',
validate: sound => {
if (sounds[sound.toLowerCase()]) return true;
return `Invalid sound, please enter either ${list(Object.keys(sounds), 'or')}.`;
},
oneOf: Object.keys(sounds),
parse: sound => sound.toLowerCase()
}
]
@@ -43,6 +42,7 @@ module.exports = class SoundboardCommand extends Command {
try {
const connection = await voiceChannel.join();
const dispatcher = connection.play(path.join(__dirname, '..', '..', 'assets', 'sounds', sounds[sound]));
await msg.react('🔉');
dispatcher.once('finish', () => voiceChannel.leave());
dispatcher.once('error', () => voiceChannel.leave());
return null;
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "95.1.0",
"version": "95.1.1",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {