optional argument

how to create an optional argument? like if the arg is empty, it uses the author, otherwise, it validates the argument into an user
Solution:
await args.pick('user').catch(() => message.author)
await args.pick('user').catch(() => message.author)
...
Jump to solution
3 Replies
Dynamic
DynamicOP5mo ago
im asking for messagecommand
Solution
UndiedGFX
UndiedGFX5mo ago
await args.pick('user').catch(() => message.author)
await args.pick('user').catch(() => message.author)
Dynamic
DynamicOP5mo ago
ok thank you, that worked
Want results from more Discord servers?
Add your server