fix to slowmode cmd

merge-requests/20/merge
Matthew 2021-03-05 17:30:32 -05:00
parent 6417a5fb22
commit 0e149a6ad9
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
1 changed files with 1 additions and 1 deletions

View File

@ -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.');