aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-12-21 17:44:47 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-12-21 17:44:47 -0500
commitc68d5ee45e1a724831d4d91d0ef352673cb828ad (patch)
treebd9ad7b5e9cf4be7244481ade6dfc8fd960475d4 /src/lib
parent6af3662b47580f810bca0103ced31f666e15f007 (diff)
downloadtanzanite-c68d5ee45e1a724831d4d91d0ef352673cb828ad.tar.gz
tanzanite-c68d5ee45e1a724831d4d91d0ef352673cb828ad.tar.bz2
tanzanite-c68d5ee45e1a724831d4d91d0ef352673cb828ad.zip
fix command args bugs
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/extensions/discord-akairo/BushCommand.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/extensions/discord-akairo/BushCommand.ts b/src/lib/extensions/discord-akairo/BushCommand.ts
index 5111c19..ae3dcb2 100644
--- a/src/lib/extensions/discord-akairo/BushCommand.ts
+++ b/src/lib/extensions/discord-akairo/BushCommand.ts
@@ -381,8 +381,8 @@ export class BushCommand extends Command {
newSlashArgs.push(newArg as SlashOption);
}
}
- newOptions.args = newTextArgs;
- newOptions.slashOptions = options_.slashOptions ?? newSlashArgs;
+ if (newTextArgs.length > 0) newOptions.args = newTextArgs;
+ if (newSlashArgs.length > 0) newOptions.slashOptions = options_.slashOptions ?? newSlashArgs;
}
type perm = PermissionResolvable | PermissionResolvable[] | MissingPermissionSupplier;