Skip to content

Commit

Permalink
chore(args): link MDN to falsy explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
almostSouji committed Mar 20, 2021
1 parent 44e84d0 commit 812c4e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion guide/creating-your-bot/commands-with-user-input.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ if (!message.mentions.users.size) {
If you're wondering what `message.reply()` does, it's just an alternative for `message.channel.send()` which also prepends a mention of the person who sent the message, unless used in a DM. It can be very useful for providing feedback!
:::

Since `message.mentions.users` is a Collection, it has a `.size` property. If no users are mentioned, it'll return 0 (which is a `falsy` value), meaning you can do `if (!value)` to check if it's falsy.
Since `message.mentions.users` is a Collection, it has a `.size` property. If no users are mentioned, it'll return 0 (which is a [falsy](https://developer.mozilla.org/en-US/docs/Glossary/Falsy) value), meaning you can use `if (!value)` to check for its validity.

If you try again, it should work as expected.

Expand Down

0 comments on commit 812c4e2

Please sign in to comment.