From 7d5c0a0696327dcbde720181c3c72e2ab8d8c867 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Thu, 26 Jul 2018 22:40:24 -0400 Subject: [PATCH] Suggest Command Command --- README.md | 3 ++- commands/random/suggest-command.js | 22 ++++++++++++++++++++++ package.json | 2 +- 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 commands/random/suggest-command.js diff --git a/README.md b/README.md index 1813f767..6ef88f5b 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Xiao is a Discord bot coded in JavaScript with The bot is no longer available for invite. You can self-host the bot, or use her on the [home server](https://discord.gg/sbMe32W). -## Commands (294) +## Commands (295) ### Utility: * **eval**: Executes JavaScript code. @@ -77,6 +77,7 @@ on the [home server](https://discord.gg/sbMe32W). * **roll**: Rolls a dice with a maximum value of your choice. * **security-key**: Responds with a random security key. * **shower-thought**: Responds with a random shower thought, directly from r/Showerthoughts. +* **suggest-command**: Suggests a random command for you to try. * **superpower**: Responds with a random superpower. * **user-roulette**: Randomly chooses a member of the server. * **would-you-rather**: Responds with a random "Would you rather ...?" question. diff --git a/commands/random/suggest-command.js b/commands/random/suggest-command.js new file mode 100644 index 00000000..ded41dda --- /dev/null +++ b/commands/random/suggest-command.js @@ -0,0 +1,22 @@ +const Command = require('../../structures/Command'); +const { stripIndents } = require('common-tags'); + +module.exports = class SuggestCommandCommand extends Command { + constructor(client) { + super(client, { + name: 'suggest-command', + aliases: ['command-suggestion', 'command-suggest'], + group: 'random', + memberName: 'suggest-command', + description: 'Suggests a random command for you to try.' + }); + } + + run(msg) { + const command = this.client.registry.commands.random(); + return msg.say(stripIndents` + Have you tried **${command.name}**? + _${command.description}_ + `); + } +}; diff --git a/package.json b/package.json index c0130ece..ae4653bb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "85.5.1", + "version": "85.6.0", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {