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
Dynamic3mo ago
im asking for messagecommand
Solution
UndiedGFX
UndiedGFX3mo ago
await args.pick('user').catch(() => message.author)
await args.pick('user').catch(() => message.author)
Dynamic
Dynamic3mo ago
ok thank you, that worked
Want results from more Discord servers?
Add your server