mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-24 22:34:46 +02:00
Update Sounds
This commit is contained in:
+13
-26
@@ -1,28 +1,15 @@
|
|||||||
[
|
[
|
||||||
"alarm",
|
["soundboard", "alarm.mp3"],
|
||||||
"ayaya",
|
["soundboard", "car-crash.mp3"],
|
||||||
"call-of-the-witch",
|
["soundboard", "cat.mp3"],
|
||||||
"car-crash",
|
["soundboard", "cow.mp3"],
|
||||||
"cat",
|
["soundboard", "dun-dun-dun.mp3"],
|
||||||
"cow",
|
["jeopardy.mp3"],
|
||||||
"dun-dun-dun",
|
["soundboard", "laugh-track.mp3"],
|
||||||
"electric-zoo",
|
["soundboard", "nipah.mp3"],
|
||||||
"error",
|
["soundboard", "rooster.mp3"],
|
||||||
"fbi-open-up",
|
["soundboard", "sad-violin.mp3"],
|
||||||
"hello-there",
|
["soundboard", "slow-clap.mp3"],
|
||||||
"here-we-go-again",
|
["whos-that-pokemon.mp3"],
|
||||||
"laugh-track",
|
["soundboard", "windows-start-up.mp3"]
|
||||||
"my-swamp",
|
|
||||||
"nipah",
|
|
||||||
"noot-noot",
|
|
||||||
"onee-chan",
|
|
||||||
"pikachu",
|
|
||||||
"rooster",
|
|
||||||
"sad-violin",
|
|
||||||
"slow-clap",
|
|
||||||
"steve-hurt",
|
|
||||||
"subaru-ringtone",
|
|
||||||
"windows-start-up",
|
|
||||||
"you-got-mail",
|
|
||||||
"you-what"
|
|
||||||
]
|
]
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -25,6 +25,11 @@ module.exports = class WhosThatPokemonCommand extends Command {
|
|||||||
url: 'https://www.pokemon.com/us/',
|
url: 'https://www.pokemon.com/us/',
|
||||||
reason: 'Images, Original Game'
|
reason: 'Images, Original Game'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: '4Kids',
|
||||||
|
url: 'https://www.4kidsentertainmentinc.com/',
|
||||||
|
reason: '"Who\'s That Pokémon?" Sound'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'PokéAPI',
|
name: 'PokéAPI',
|
||||||
url: 'https://pokeapi.co/',
|
url: 'https://pokeapi.co/',
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ const Command = require('../../structures/Command');
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
const { list, reactIfAble } = require('../../util/Util');
|
const { list, reactIfAble } = require('../../util/Util');
|
||||||
const sounds = require('../../assets/json/soundboard');
|
const sounds = require('../../assets/json/soundboard');
|
||||||
|
const soundsChoice = sounds.map(sound => sound[sounds.length - 1].replace(/\.mp3$/, ''));
|
||||||
|
|
||||||
module.exports = class SoundboardCommand extends Command {
|
module.exports = class SoundboardCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
@@ -18,45 +19,93 @@ module.exports = class SoundboardCommand extends Command {
|
|||||||
},
|
},
|
||||||
userPermissions: ['CONNECT', 'SPEAK'],
|
userPermissions: ['CONNECT', 'SPEAK'],
|
||||||
credit: [
|
credit: [
|
||||||
{
|
|
||||||
name: 'Pokémon',
|
|
||||||
url: 'https://www.pokemon.com/us/',
|
|
||||||
reason: 'Pikachu Sound'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: '07th Expansion',
|
name: '07th Expansion',
|
||||||
url: 'http://07th-expansion.net/',
|
url: 'http://07th-expansion.net/',
|
||||||
reason: 'Nipah Sound'
|
reason: 'Nipah Sound'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'KINMOZA!',
|
name: 'UncleKornicob',
|
||||||
url: 'http://www.kinmosa.com/',
|
url: 'http://soundbible.com/',
|
||||||
reason: 'Ayaya Sound'
|
reason: 'Alarm Sound',
|
||||||
|
reasonURL: 'http://soundbible.com/1787-Annoying-Alarm-Clock.html'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Robret Henc',
|
name: 'Mike Koenig',
|
||||||
url: 'https://www.youtube.com/channel/UCYz0kLfJbdNHU9baJy6u68A',
|
url: 'http://soundbible.com/',
|
||||||
reason: 'Subaru Ringtone Sound',
|
reason: 'Rooster Sound',
|
||||||
reasonURL: 'https://www.youtube.com/watch?v=PEyKDgOTQi8'
|
reasonURL: 'http://soundbible.com/1218-Rooster-Crow.html'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Myinstants',
|
name: 'Mike Koenig',
|
||||||
url: 'https://www.myinstants.com/index/us/',
|
url: 'http://soundbible.com/',
|
||||||
reason: 'Various Meme Sounds',
|
reason: 'Cow Sound',
|
||||||
reasonURL: 'https://www.myinstants.com/search/?name=meme'
|
reasonURL: 'http://soundbible.com/1778-Cow-Moo.html'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Cam Martinez',
|
||||||
|
url: 'http://soundbible.com/',
|
||||||
|
reason: 'Car Crash Sound',
|
||||||
|
reasonURL: 'http://soundbible.com/1757-Car-Brake-Crash.html'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Orange Free Sounds',
|
||||||
|
url: 'http://www.orangefreesounds.com/',
|
||||||
|
reason: 'Dun Dun Dun Sound',
|
||||||
|
reasonURL: 'http://www.orangefreesounds.com/dun-dun-dun-sound-effect-brass/'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Apple',
|
||||||
|
url: 'https://www.apple.com/',
|
||||||
|
reason: 'Cat Sound'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'GRSites',
|
||||||
|
url: 'http://www.grsites.com/',
|
||||||
|
reason: 'Laugh Track Sound',
|
||||||
|
reasonURL: 'http://www.grsites.com/archive/sounds/category/8/'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Jeopardy',
|
||||||
|
url: 'https://www.jeopardy.com/',
|
||||||
|
reason: 'Jeopardy Sound'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '4Kids',
|
||||||
|
url: 'https://www.4kidsentertainmentinc.com/',
|
||||||
|
reason: 'Who\'s That Pokémon Sound'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Over the Green Fields',
|
||||||
|
url: 'https://asianwiki.com/Over_the_Green_Fields',
|
||||||
|
reason: 'Sad Violin Sound'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Valve',
|
||||||
|
url: 'https://www.valvesoftware.com/en/',
|
||||||
|
reasonURL: 'http://www.thinkwithportals.com/',
|
||||||
|
reason: 'Slow Clap Sound'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Microsoft',
|
||||||
|
url: 'https://www.microsoft.com/en-us',
|
||||||
|
reason: 'Windows Start Up Sound'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
args: [
|
args: [
|
||||||
{
|
{
|
||||||
key: 'sound',
|
key: 'sound',
|
||||||
prompt: `What sound do you want to play? Either ${list(sounds, 'or')}.`,
|
prompt: `What sound do you want to play? Either ${list(soundsChoice, 'or')}.`,
|
||||||
type: 'string',
|
type: 'string',
|
||||||
validate: sound => {
|
validate: sound => {
|
||||||
const choice = sound.toLowerCase().replaceAll(' ', '-');
|
const choice = sound.toLowerCase().replaceAll(' ', '-');
|
||||||
if (sounds.includes(choice)) return true;
|
if (soundsChoice.includes(choice)) return true;
|
||||||
return `You provided an invalid sound. Please choose either ${list(sounds, 'or')}.`;
|
return `You provided an invalid sound. Please choose either ${list(soundsChoice, 'or')}.`;
|
||||||
},
|
},
|
||||||
parse: sound => `${sound.toLowerCase().replaceAll(' ', '-')}.mp3`
|
parse: sound => {
|
||||||
|
const choice = sound.toLowerCase().replaceAll(' ', '-');
|
||||||
|
return sounds.find(snd => snd.includes(`${choice}.mp3`));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
@@ -68,7 +117,7 @@ module.exports = class SoundboardCommand extends Command {
|
|||||||
const usage = this.client.registry.commands.get('join').usage();
|
const usage = this.client.registry.commands.get('join').usage();
|
||||||
return msg.reply(`I am not in a voice channel. Use ${usage} to fix that!`);
|
return msg.reply(`I am not in a voice channel. Use ${usage} to fix that!`);
|
||||||
}
|
}
|
||||||
connection.play(path.join(__dirname, '..', '..', 'assets', 'sounds', 'soundboard', sound));
|
connection.play(path.join(__dirname, '..', '..', 'assets', 'sounds', ...sound));
|
||||||
await reactIfAble(msg, this.client.user, '🔉');
|
await reactIfAble(msg, this.client.user, '🔉');
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "122.1.0",
|
"version": "123.0.0",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user