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