mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-20 05:51:35 +02:00
22.0.0
This commit is contained in:
@@ -7,20 +7,21 @@ module.exports = class ComplimentCommand extends Command {
|
||||
name: 'compliment',
|
||||
group: 'response',
|
||||
memberName: 'compliment',
|
||||
description: 'Compliments something/someone.',
|
||||
description: 'Compliments a user.',
|
||||
args: [
|
||||
{
|
||||
key: 'thing',
|
||||
prompt: 'What do you want to compliment?',
|
||||
type: 'string'
|
||||
key: 'user',
|
||||
prompt: 'What user do you want to compliment?',
|
||||
type: 'user',
|
||||
default: ''
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
run(msg, args) {
|
||||
const { thing } = args;
|
||||
const user = args.user || msg.author;
|
||||
const compliment = compliments[Math.floor(Math.random() * compliments.length)];
|
||||
return msg.say(`${thing}, ${compliment}`);
|
||||
return msg.say(`${user}, ${compliment}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -13,11 +13,14 @@ module.exports = class RandomNameCommand extends Command {
|
||||
key: 'gender',
|
||||
prompt: 'Which gender do you want to generate a name for?',
|
||||
type: 'string',
|
||||
validate: gender => {
|
||||
if (['male', 'female'].includes(gender.toLowerCase())) return true;
|
||||
return 'Please enter either `male` or `female`.';
|
||||
validate: (gender) => {
|
||||
if (['male', 'female'].includes(gender.toLowerCase())) {
|
||||
return true;
|
||||
} else {
|
||||
return 'Please enter either `male` or `female`.';
|
||||
}
|
||||
},
|
||||
parse: gender => gender.toLowerCase()
|
||||
parse: (gender) => gender.toLowerCase()
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
@@ -7,11 +7,11 @@ module.exports = class RoastCommand extends Command {
|
||||
name: 'roast',
|
||||
group: 'response',
|
||||
memberName: 'roast',
|
||||
description: 'Roasts something/someone.',
|
||||
description: 'Roasts a user.',
|
||||
args: [
|
||||
{
|
||||
key: 'thing',
|
||||
prompt: 'What do you want to roast?',
|
||||
key: 'user',
|
||||
prompt: 'What user do you want to roast?',
|
||||
type: 'string'
|
||||
}
|
||||
]
|
||||
@@ -19,8 +19,8 @@ module.exports = class RoastCommand extends Command {
|
||||
}
|
||||
|
||||
run(msg, args) {
|
||||
const { thing } = args;
|
||||
const user = args.user || msg.author;
|
||||
const roast = roasts[Math.floor(Math.random() * roasts.length)];
|
||||
return msg.say(`${thing}, ${roast}`);
|
||||
return msg.say(`${user}, ${roast}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -13,7 +13,8 @@ module.exports = class RollCommand extends Command {
|
||||
key: 'value',
|
||||
label: 'maximum number',
|
||||
prompt: 'What is the maximum number you wish to appear?',
|
||||
type: 'integer'
|
||||
type: 'integer',
|
||||
default: 6
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
@@ -21,12 +21,6 @@ module.exports = class ShipCommand extends Command {
|
||||
run(msg, args) {
|
||||
const { things } = args;
|
||||
const rating = Math.floor(Math.random() * 100) + 1;
|
||||
let response;
|
||||
if (rating < 25) response = 'Ouch. Might want to keep them apart.';
|
||||
else if (rating < 50) response = 'Meh, they should keep looking.';
|
||||
else if (rating < 75) response = 'Could be worse, they should try it.';
|
||||
else if (rating < 90) response = 'Not too bad. It might work out.';
|
||||
else response = 'These guys have one bright future ahead of them!';
|
||||
return msg.say(`I'd give ${things} a ${rating}%! ${response}`);
|
||||
return msg.say(`I'd give ${things} a ${rating}%!`);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user