mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-25 22:32:50 +02:00
args and more
This commit is contained in:
@@ -10,16 +10,21 @@ module.exports = class ShipCommand extends commando.Command {
|
||||
group: 'response',
|
||||
memberName: 'ship',
|
||||
description: 'Ships two people. (;ship @Rem and @Nate)',
|
||||
examples: [';ship @Rem and @Nate']
|
||||
examples: [';ship @Rem and @Nate'],
|
||||
args: [{
|
||||
key: 'things',
|
||||
prompt: 'What do you want to ship together?',
|
||||
type: 'string'
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
||||
run(message) {
|
||||
run(message, args) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let thingToShip = message.content.split(" ").slice(1).join(" ");
|
||||
let thingToShip = args.things;
|
||||
let percentage = Math.floor(Math.random() * 100) + 1;
|
||||
return message.channel.send(`I'd give ${thingToShip} a ${percentage}%!`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user