mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-21 05:54:33 +02:00
Remove Soundboard
This commit is contained in:
@@ -1,16 +0,0 @@
|
|||||||
{
|
|
||||||
"names": [
|
|
||||||
"airhorn",
|
|
||||||
"cat",
|
|
||||||
"dun dun dun",
|
|
||||||
"pikachu",
|
|
||||||
"space"
|
|
||||||
],
|
|
||||||
"paths": {
|
|
||||||
"airhorn": "airhorn.mp3",
|
|
||||||
"cat": "cat.mp3",
|
|
||||||
"dun dun dun": "dun-dun-dun.mp3",
|
|
||||||
"pikachu": "pikachu.mp3",
|
|
||||||
"space": "space.mp3"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,57 +0,0 @@
|
|||||||
const Command = require('../../structures/Command');
|
|
||||||
const { names, paths } = require('../../assets/json/soundboard');
|
|
||||||
const path = require('path');
|
|
||||||
|
|
||||||
module.exports = class SoundboardCommand extends Command {
|
|
||||||
constructor(client) {
|
|
||||||
super(client, {
|
|
||||||
name: 'soundboard',
|
|
||||||
aliases: ['sound'],
|
|
||||||
group: 'random',
|
|
||||||
memberName: 'soundboard',
|
|
||||||
description: 'Plays a sound in your voice channel.',
|
|
||||||
details: `**Sounds:** ${names.join(', ')}`,
|
|
||||||
guildOnly: true,
|
|
||||||
throttling: {
|
|
||||||
usages: 1,
|
|
||||||
duration: 15
|
|
||||||
},
|
|
||||||
clientPermissions: ['ADD_REACTIONS'],
|
|
||||||
args: [
|
|
||||||
{
|
|
||||||
key: 'sound',
|
|
||||||
prompt: 'What sound would you like to play?',
|
|
||||||
type: 'string',
|
|
||||||
validate: (sound) => {
|
|
||||||
if (names.includes(sound.toLowerCase())) return true;
|
|
||||||
else return 'Invalid Sound. Use `help soundboard` for a list of sounds.';
|
|
||||||
},
|
|
||||||
parse: (sound) => sound.toLowerCase()
|
|
||||||
}
|
|
||||||
]
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
async run(msg, args) {
|
|
||||||
const voiceChannel = msg.member.voiceChannel;
|
|
||||||
if (!voiceChannel) return msg.say('Please enter a Voice Channel first.');
|
|
||||||
if (!voiceChannel.permissionsFor(this.client.user).has(['CONNECT', 'SPEAK'])) {
|
|
||||||
return msg.say('Missing the `CONNECT` or `SPEAK` Permission for the Voice Channel.');
|
|
||||||
}
|
|
||||||
if (!voiceChannel.joinable) return msg.say('Your Voice Channel is not joinable.');
|
|
||||||
if (this.client.voiceConnections.has(voiceChannel.guild.id)) return msg.say('I am already playing a sound.');
|
|
||||||
const { sound } = args;
|
|
||||||
const connection = await voiceChannel.join();
|
|
||||||
await msg.react('🔊');
|
|
||||||
const dispatcher = connection.playFile(path.join(__dirname, '..', '..', 'assets', 'sounds', paths[sound]));
|
|
||||||
dispatcher.once('end', () => {
|
|
||||||
voiceChannel.leave();
|
|
||||||
msg.react('✅');
|
|
||||||
});
|
|
||||||
dispatcher.once('error', () => {
|
|
||||||
voiceChannel.leave();
|
|
||||||
msg.react('⚠');
|
|
||||||
});
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@@ -27,7 +27,6 @@
|
|||||||
<li>Tons of Secret Easter Eggs to discover!</li>
|
<li>Tons of Secret Easter Eggs to discover!</li>
|
||||||
<li>Horoscopes!</li>
|
<li>Horoscopes!</li>
|
||||||
<li>LMGTFY Link Generation!</li>
|
<li>LMGTFY Link Generation!</li>
|
||||||
<li>Soundboard!</li>
|
|
||||||
<li>Starboard!</li>
|
<li>Starboard!</li>
|
||||||
<li>Strawpoll Generation!</li>
|
<li>Strawpoll Generation!</li>
|
||||||
<li>Events that Happened today in history!</li>
|
<li>Events that Happened today in history!</li>
|
||||||
|
|||||||
@@ -24,7 +24,6 @@
|
|||||||
<li>Tons of Secret Easter Eggs to discover!</li>
|
<li>Tons of Secret Easter Eggs to discover!</li>
|
||||||
<li>Horoscopes!</li>
|
<li>Horoscopes!</li>
|
||||||
<li>LMGTFY Link Generation!</li>
|
<li>LMGTFY Link Generation!</li>
|
||||||
<li>Soundboard!</li>
|
|
||||||
<li>Starboard!</li>
|
<li>Starboard!</li>
|
||||||
<li>Strawpoll Generation!</li>
|
<li>Strawpoll Generation!</li>
|
||||||
<li>Events that Happened today in history!</li>
|
<li>Events that Happened today in history!</li>
|
||||||
|
|||||||
+1
-2
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiaobot",
|
"name": "xiaobot",
|
||||||
"version": "23.0.0",
|
"version": "24.0.0",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Shard.js",
|
"main": "Shard.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -45,7 +45,6 @@
|
|||||||
"mathjs": "^3.13.3",
|
"mathjs": "^3.13.3",
|
||||||
"moment": "^2.18.1",
|
"moment": "^2.18.1",
|
||||||
"moment-duration-format": "^1.3.0",
|
"moment-duration-format": "^1.3.0",
|
||||||
"node-opus": "^0.2.6",
|
|
||||||
"pg": "^6.2.4",
|
"pg": "^6.2.4",
|
||||||
"sequelize": "^4.1.0",
|
"sequelize": "^4.1.0",
|
||||||
"snekfetch": "^3.1.11",
|
"snekfetch": "^3.1.11",
|
||||||
|
|||||||
Reference in New Issue
Block a user