mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-24 02:15:10 +02:00
Cleaner Looking args
This commit is contained in:
+16
-13
@@ -12,21 +12,24 @@ module.exports = class BanCommand extends Command {
|
||||
memberName: 'ban',
|
||||
description: 'Bans a user and logs the ban to the mod_logs.',
|
||||
guildOnly: true,
|
||||
args: [{
|
||||
key: 'member',
|
||||
prompt: 'What member do you want to ban?',
|
||||
type: 'member'
|
||||
}, {
|
||||
key: 'reason',
|
||||
prompt: 'What do you want to set the reason as?',
|
||||
type: 'string',
|
||||
validate: reason => {
|
||||
if (reason.length < 140) {
|
||||
return true;
|
||||
args: [
|
||||
{
|
||||
key: 'member',
|
||||
prompt: 'What member do you want to ban?',
|
||||
type: 'member'
|
||||
},
|
||||
{
|
||||
key: 'reason',
|
||||
prompt: 'What do you want to set the reason as?',
|
||||
type: 'string',
|
||||
validate: reason => {
|
||||
if (reason.length < 140) {
|
||||
return true;
|
||||
}
|
||||
return `Please keep your reason under 140 characters, you have ${reason.length}.`;
|
||||
}
|
||||
return `Please keep your reason under 140 characters, you have ${reason.length}.`;
|
||||
}
|
||||
}]
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user