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
DynamicOP7mo ago
im asking for messagecommand
Solution
UndiedGFX
UndiedGFX7mo ago
await args.pick('user').catch(() => message.author)
await args.pick('user').catch(() => message.author)
Dynamic
DynamicOP7mo ago
ok thank you, that worked

Did you find this page helpful?