Yes No Command

This commit is contained in:
Dragon Fire
2021-01-19 18:38:59 -05:00
parent 7600ad3808
commit cb6bde3ae7
3 changed files with 33 additions and 2 deletions
+2 -1
View File
@@ -261,7 +261,7 @@ in the appropriate channel's topic to use it.
## Commands
Total: 579
Total: 580
### Utility:
@@ -363,6 +363,7 @@ Total: 579
* **this-for-that:** So, basically, it's like a bot command for this dumb meme.
* **word:** Responds with a random word.
* **xiao-fact:** Responds with a random fact about Xiao.
* **yes-no:** Answers a yes/no question randomly.
* **yo-mama:** Responds with a random "Yo Mama" joke.
### Random Image:
+30
View File
@@ -0,0 +1,30 @@
const Command = require('../../structures/Command');
const { stripIndents } = require('common-tags');
const answers = ['Yes', 'No'];
module.exports = class YesNoCommand extends Command {
constructor(client) {
super(client, {
name: 'yes-no',
aliases: ['y-n'],
group: 'random-res',
memberName: 'yes-no',
description: 'Answers a yes/no question randomly.',
args: [
{
key: 'question',
prompt: 'What do you want to get an answer for?',
type: 'string',
max: 1950
}
]
});
}
run(msg, { question }) {
return msg.say(stripIndents`
${question}
${answers[Math.floor(Math.random() * answers.length)]}
`);
}
};
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "126.7.0",
"version": "126.8.0",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {