Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(guide): enum argument #124

Merged
merged 6 commits into from
Jan 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/Guide/arguments/built-in-arguments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ To facilitate creating commands and getting your bot running, Sapphire bundles a
- `role`: Resolves to a [`Role`][role] instance, given a role name, mention or ID.
- `string`: Resolves to a string containing the parameter.
- `user`: Resolves to a [`User`][user] instance, given a user mention or ID.
- `enum`: Resolves to a string if it occurs within the [`array`][array] of possible items that is passed as an option
(`enum`).

[boolean]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean
[categorychannel]: https://discord.js.org/#/docs/main/stable/class/CategoryChannel
Expand All @@ -68,3 +70,4 @@ To facilitate creating commands and getting your bot running, Sapphire bundles a
[voicechannel]: https://discord.js.org/#/docs/main/stable/class/VoiceChannel
[mdn-date]:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#several_ways_to_create_a_date_object
[array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array