Only let user use a number between 3 and 100
This commit is contained in:
parent
960deeeeb3
commit
c309885d63
1 changed files with 2 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
|||
const { Command } = require('discord-akairo');
|
||||
const { Command, Argument } = require('discord-akairo');
|
||||
|
||||
class dominoCommand extends Command {
|
||||
constructor() {
|
||||
|
@ -8,7 +8,7 @@ class dominoCommand extends Command {
|
|||
args: [
|
||||
{
|
||||
id: 'number',
|
||||
type: 'integer',
|
||||
type: Argument.range('number', 3, 100),
|
||||
default: 10
|
||||
}
|
||||
],
|
||||
|
@ -21,8 +21,6 @@ class dominoCommand extends Command {
|
|||
}
|
||||
|
||||
async exec(message, args) {
|
||||
if (args.domino < 2)
|
||||
return message.channel.send('Can\'t do less than 3');
|
||||
let domino = 'I';
|
||||
|
||||
message.util.send(domino.repeat(args.number))
|
||||
|
|
Loading…
Reference in a new issue