fix to slowmode cmd
parent
6417a5fb22
commit
0e149a6ad9
|
@ -18,7 +18,7 @@ export default class Slowmode extends Command {
|
||||||
|
|
||||||
public async run(message: Message<GuildTextableChannel>, args: string[]) {
|
public async run(message: Message<GuildTextableChannel>, args: string[]) {
|
||||||
try {
|
try {
|
||||||
if (!args[0]) return this.error(message.channel, 'This command requires an argument.');
|
if (!args[0]) return this.client.commands.get('help').run(message, [this.name]);
|
||||||
|
|
||||||
const [length, unit] = args[0].match(this.regex);
|
const [length, unit] = args[0].match(this.regex);
|
||||||
if (Number.isNaN(Number(length))) return this.error(message.channel, 'Could not determine the slowmode time.');
|
if (Number.isNaN(Number(length))) return this.error(message.channel, 'Could not determine the slowmode time.');
|
||||||
|
|
Loading…
Reference in New Issue