mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 00:07:36 +02:00
More Soundboard stuff
This commit is contained in:
@@ -19,7 +19,7 @@ class SoundBoardCommand extends commando.Command {
|
|||||||
}
|
}
|
||||||
console.log("[Command] " + message.content);
|
console.log("[Command] " + message.content);
|
||||||
if(message.channel.type !== 'dm') {
|
if(message.channel.type !== 'dm') {
|
||||||
if(!message.channel.permissionsFor(this.client.user).hasPermission('CONNECT' && 'SPEAK')) {
|
if(!message.channel.permissionsFor(this.client.user).hasPermission(['CONNECT', 'SPEAK'])) {
|
||||||
message.channel.send(':x: Error! In order to do this command, you must give me the permissions to "Connect" and "Speak"!');
|
message.channel.send(':x: Error! In order to do this command, you must give me the permissions to "Connect" and "Speak"!');
|
||||||
} else {
|
} else {
|
||||||
let voiceChannel = message.member.voiceChannel;
|
let voiceChannel = message.member.voiceChannel;
|
||||||
@@ -30,7 +30,7 @@ class SoundBoardCommand extends commando.Command {
|
|||||||
if(soundToPlay === "") {
|
if(soundToPlay === "") {
|
||||||
message.channel.send(':x: Error! No sound set. Please use ;soundboard list to see a list of sounds you can play.');
|
message.channel.send(':x: Error! No sound set. Please use ;soundboard list to see a list of sounds you can play.');
|
||||||
} else if(soundToPlay === 'list') {
|
} else if(soundToPlay === 'list') {
|
||||||
message.channel.send('**Avaliable Sounds:** Cat');
|
message.channel.send('**Available Sounds:** Cat, Pikachu, Vader');
|
||||||
} else if(soundToPlay === sounds.avaliable[soundToPlay]) {
|
} else if(soundToPlay === sounds.avaliable[soundToPlay]) {
|
||||||
voiceChannel.join().then(connnection => {
|
voiceChannel.join().then(connnection => {
|
||||||
let stream = sounds.paths[soundToPlay];
|
let stream = sounds.paths[soundToPlay];
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
{
|
{
|
||||||
"avaliable": {
|
"avaliable": {
|
||||||
"cat": "cat"
|
"cat": "cat",
|
||||||
|
"pikachu": "pikachu",
|
||||||
|
"vader": "vader"
|
||||||
},
|
},
|
||||||
"paths": {
|
"paths": {
|
||||||
"cat": "./sounds/cat.mp3"
|
"cat": "./sounds/cat.mp3",
|
||||||
|
"pikachu": "./sounds/pikachu.mp3",
|
||||||
|
"vader": "./sounds/vader.mp3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user