diff --git a/README.md b/README.md index 5ba86d72..4f848499 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ You can invite the bot to your server using Be sure to also join the [home server](https://discord.gg/sbMe32W) for information and support. -## Commands (303) +## Commands (302) ### Utility: * **prefix**: Shows or sets the command prefix. @@ -217,7 +217,6 @@ information and support. ### Voice Channel: -* **airhorn**: Plays an airhorn sound in your voice channel. * **leave-voice-channel**: Leaves a voice channel, in case the bot gets stuck. * **soundboard**: Plays a sound in your voice channel. diff --git a/assets/json/soundboard.json b/assets/json/soundboard.json index bce62bdf..79193635 100644 --- a/assets/json/soundboard.json +++ b/assets/json/soundboard.json @@ -1,4 +1,5 @@ { + "airhorn": "airhorn.mp3", "alarm": "alarm.mp3", "ayaya": "ayaya.mp3", "car crash": "car-crash.mp3", diff --git a/assets/sounds/airhorn/default.mp3 b/assets/sounds/airhorn.mp3 similarity index 100% rename from assets/sounds/airhorn/default.mp3 rename to assets/sounds/airhorn.mp3 diff --git a/assets/sounds/airhorn/clownfull.mp3 b/assets/sounds/airhorn/clownfull.mp3 deleted file mode 100644 index 983d8a7f..00000000 Binary files a/assets/sounds/airhorn/clownfull.mp3 and /dev/null differ diff --git a/assets/sounds/airhorn/clownshort.mp3 b/assets/sounds/airhorn/clownshort.mp3 deleted file mode 100644 index 019d97e0..00000000 Binary files a/assets/sounds/airhorn/clownshort.mp3 and /dev/null differ diff --git a/assets/sounds/airhorn/clownspam.mp3 b/assets/sounds/airhorn/clownspam.mp3 deleted file mode 100644 index 0f706dc0..00000000 Binary files a/assets/sounds/airhorn/clownspam.mp3 and /dev/null differ diff --git a/assets/sounds/airhorn/distant.mp3 b/assets/sounds/airhorn/distant.mp3 deleted file mode 100644 index 448acba8..00000000 Binary files a/assets/sounds/airhorn/distant.mp3 and /dev/null differ diff --git a/assets/sounds/airhorn/echo.mp3 b/assets/sounds/airhorn/echo.mp3 deleted file mode 100644 index 5b5133f7..00000000 Binary files a/assets/sounds/airhorn/echo.mp3 and /dev/null differ diff --git a/assets/sounds/airhorn/fourtap.mp3 b/assets/sounds/airhorn/fourtap.mp3 deleted file mode 100644 index ef9e1c9d..00000000 Binary files a/assets/sounds/airhorn/fourtap.mp3 and /dev/null differ diff --git a/assets/sounds/airhorn/highfartlong.mp3 b/assets/sounds/airhorn/highfartlong.mp3 deleted file mode 100644 index f2d392d1..00000000 Binary files a/assets/sounds/airhorn/highfartlong.mp3 and /dev/null differ diff --git a/assets/sounds/airhorn/highfartshort.mp3 b/assets/sounds/airhorn/highfartshort.mp3 deleted file mode 100644 index b038689c..00000000 Binary files a/assets/sounds/airhorn/highfartshort.mp3 and /dev/null differ diff --git a/assets/sounds/airhorn/midshort.mp3 b/assets/sounds/airhorn/midshort.mp3 deleted file mode 100644 index 77b791f0..00000000 Binary files a/assets/sounds/airhorn/midshort.mp3 and /dev/null differ diff --git a/assets/sounds/airhorn/reverb.mp3 b/assets/sounds/airhorn/reverb.mp3 deleted file mode 100644 index f9f34d40..00000000 Binary files a/assets/sounds/airhorn/reverb.mp3 and /dev/null differ diff --git a/assets/sounds/airhorn/spam.mp3 b/assets/sounds/airhorn/spam.mp3 deleted file mode 100644 index e5a68d09..00000000 Binary files a/assets/sounds/airhorn/spam.mp3 and /dev/null differ diff --git a/assets/sounds/airhorn/tripletap.mp3 b/assets/sounds/airhorn/tripletap.mp3 deleted file mode 100644 index ccc1ab8d..00000000 Binary files a/assets/sounds/airhorn/tripletap.mp3 and /dev/null differ diff --git a/assets/sounds/airhorn/truck.mp3 b/assets/sounds/airhorn/truck.mp3 deleted file mode 100644 index b27982ef..00000000 Binary files a/assets/sounds/airhorn/truck.mp3 and /dev/null differ diff --git a/commands/events/neko-atsume-password.js b/commands/events/neko-atsume-password.js index 6cc698e6..22191bf6 100644 --- a/commands/events/neko-atsume-password.js +++ b/commands/events/neko-atsume-password.js @@ -33,8 +33,7 @@ module.exports = class NekoAtsumePasswordCommand extends Command { The current Neko Atsume password is **${data.password}**. It will expire in **${duration(data.expires - data.date)}**. - ${data.gold} ${this.goldFish} - ${data.silver} ${this.silverFish} + ${data.gold} ${this.goldFish} ${data.silver} ${this.silverFish} `); } catch (err) { return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); diff --git a/commands/random/reddit.js b/commands/random/reddit.js index 7f325e50..d5c87624 100644 --- a/commands/random/reddit.js +++ b/commands/random/reddit.js @@ -6,7 +6,7 @@ module.exports = class RedditCommand extends Command { constructor(client) { super(client, { name: 'reddit', - aliases: ['subreddit'], + aliases: ['subreddit', 'r/'], group: 'random', memberName: 'reddit', description: 'Responds with a random post from a subreddit.', diff --git a/commands/search/flickr.js b/commands/search/flickr.js index 69b619c2..548186a6 100644 --- a/commands/search/flickr.js +++ b/commands/search/flickr.js @@ -10,6 +10,7 @@ module.exports = class FlickrCommand extends Command { group: 'search', memberName: 'flickr', description: 'Searches Flickr for your query.', + nsfw: true, args: [ { key: 'query', diff --git a/commands/search/rule34.js b/commands/search/rule34.js index 834b07bc..b058ab69 100644 --- a/commands/search/rule34.js +++ b/commands/search/rule34.js @@ -5,7 +5,7 @@ module.exports = class Rule34Command extends Command { constructor(client) { super(client, { name: 'rule34', - aliases: ['rule34-image'], + aliases: ['rule34-image', 'r34'], group: 'search', memberName: 'rule34', description: 'Responds with an image from Rule34, with optional query.', diff --git a/commands/search/wikihow.js b/commands/search/wikihow.js index 3685ef89..9e7bba63 100644 --- a/commands/search/wikihow.js +++ b/commands/search/wikihow.js @@ -6,7 +6,7 @@ module.exports = class WikihowCommand extends Command { constructor(client) { super(client, { name: 'wikihow', - aliases: ['wikihow-article', 'how-to'], + aliases: ['wikihow-article', 'how-to', 'how'], group: 'search', memberName: 'wikihow', description: 'Searches Wikihow for your query.', @@ -15,7 +15,7 @@ module.exports = class WikihowCommand extends Command { key: 'query', prompt: 'What article would you like to search for?', type: 'string', - parse: query => query.replace(/^(how to)/i, '') + parse: query => query.replace(/^((how )?to)/i, '') } ] }); diff --git a/commands/voice/airhorn.js b/commands/voice/airhorn.js deleted file mode 100644 index 96f5dce6..00000000 --- a/commands/voice/airhorn.js +++ /dev/null @@ -1,41 +0,0 @@ -const Command = require('../../structures/Command'); -const fs = require('fs'); -const path = require('path'); -const sounds = fs.readdirSync(path.join(__dirname, '..', '..', 'assets', 'sounds', 'airhorn')); - -module.exports = class AirhornCommand extends Command { - constructor(client) { - super(client, { - name: 'airhorn', - group: 'voice', - memberName: 'airhorn', - description: 'Plays an airhorn sound in your voice channel.', - guildOnly: true, - throttling: { - usages: 1, - duration: 10 - } - }); - } - - async run(msg) { - const channel = msg.member.voiceChannel; - if (!channel) return msg.reply('Please enter a voice channel first.'); - if (!channel.permissionsFor(this.client.user).has(['CONNECT', 'SPEAK'])) { - return msg.reply('Missing the "Connect" or "Speak" permission for the voice channel.'); - } - if (!channel.joinable) return msg.reply('Your voice channel is not joinable.'); - if (this.client.voiceConnections.has(channel.guild.id)) return msg.reply('I am already playing a sound.'); - try { - const connection = await channel.join(); - const airhorn = sounds[Math.floor(Math.random() * sounds.length)]; - const dispatcher = connection.play(path.join(__dirname, '..', '..', 'assets', 'sounds', 'airhorn', airhorn)); - dispatcher.once('finish', () => channel.leave()); - dispatcher.once('error', () => channel.leave()); - return null; - } catch (err) { - channel.leave(); - throw err; - } - } -}; diff --git a/package.json b/package.json index f1559dfb..935c4f95 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "80.1.2", + "version": "81.0.0", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": { @@ -48,8 +48,8 @@ "zlib-sync": "^0.1.4" }, "devDependencies": { - "eslint": "^5.0.0", - "eslint-config-amber": "^1.0.2", + "eslint": "^5.0.1", + "eslint-config-amber": "^1.0.3", "eslint-plugin-json": "^1.2.0" }, "eslintConfig": {