mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-27 22:27:44 +02:00
Yes No Command
This commit is contained in:
@@ -261,7 +261,7 @@ in the appropriate channel's topic to use it.
|
|||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
|
|
||||||
Total: 579
|
Total: 580
|
||||||
|
|
||||||
### Utility:
|
### Utility:
|
||||||
|
|
||||||
@@ -363,6 +363,7 @@ Total: 579
|
|||||||
* **this-for-that:** So, basically, it's like a bot command for this dumb meme.
|
* **this-for-that:** So, basically, it's like a bot command for this dumb meme.
|
||||||
* **word:** Responds with a random word.
|
* **word:** Responds with a random word.
|
||||||
* **xiao-fact:** Responds with a random fact about Xiao.
|
* **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.
|
* **yo-mama:** Responds with a random "Yo Mama" joke.
|
||||||
|
|
||||||
### Random Image:
|
### Random Image:
|
||||||
|
|||||||
@@ -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
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "126.7.0",
|
"version": "126.8.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