Type conversions for Discord objects
Treat a user or an interaction as a more specific type so that you can use its extra values.
Treat user as server member
Resolve a Discord user to their server member. Returns nothing if the user is not a member of the given server.
Inputs
| Name | Type | Required | Details |
|---|---|---|---|
| User | User | Yes | User to resolve. |
Outputs
| Name | Type | Details |
|---|---|---|
| Member | Server member | Resolved server member, or empty if not a member of that server. May be empty. |
Treat interaction as button click
Narrow a generic interaction to a button click. Returns nothing if the interaction is a different kind.
Inputs
| Name | Type | Required | Details |
|---|---|---|---|
| Interaction | Interaction | Yes | Interaction to narrow. |
Outputs
| Name | Type | Details |
|---|---|---|
| Button interaction | Button click | Narrowed button click, or empty if not a button click. May be empty. |
Treat interaction as dropdown
Narrow a generic interaction to a dropdown submission. Returns nothing if the interaction is a different kind.
Inputs
| Name | Type | Required | Details |
|---|---|---|---|
| Interaction | Interaction | Yes | Interaction to narrow. |
Outputs
| Name | Type | Details |
|---|---|---|
| Dropdown interaction | Dropdown interaction | Narrowed dropdown submission, or empty if not a dropdown. May be empty. |
Treat interaction as user dropdown
Narrow a generic interaction to a user dropdown submission. Returns nothing if the interaction is a different kind.
Inputs
| Name | Type | Required | Details |
|---|---|---|---|
| Interaction | Interaction | Yes | Interaction to narrow. |
Outputs
| Name | Type | Details |
|---|---|---|
| User dropdown interaction | User dropdown interaction | Narrowed member select submission, or empty if not a member select. Its picked values come back as real members, not as IDs. May be empty. |
Treat interaction as role dropdown
Narrow a generic interaction to a role dropdown submission. Returns nothing if the interaction is a different kind.
Inputs
| Name | Type | Required | Details |
|---|---|---|---|
| Interaction | Interaction | Yes | Interaction to narrow. |
Outputs
| Name | Type | Details |
|---|---|---|
| Role dropdown interaction | Role dropdown interaction | Narrowed role select submission, or empty if not a role select. Its picked values come back as real roles, not as IDs. May be empty. |
Treat interaction as channel dropdown
Narrow a generic interaction to a channel dropdown submission. Returns nothing if the interaction is a different kind.
Inputs
| Name | Type | Required | Details |
|---|---|---|---|
| Interaction | Interaction | Yes | Interaction to narrow. |
Outputs
| Name | Type | Details |
|---|---|---|
| Channel dropdown interaction | Channel dropdown interaction | Narrowed channel select submission, or empty if not a channel select. Its picked values come back as real channels, not as IDs. May be empty. |
Treat interaction as user-or-role dropdown
Narrow a generic interaction to a user-or-role dropdown submission. Returns nothing if the interaction is a different kind.
Inputs
| Name | Type | Required | Details |
|---|---|---|---|
| Interaction | Interaction | Yes | Interaction to narrow. |
Outputs
| Name | Type | Details |
|---|---|---|
| User-or-role dropdown interaction | User-or-role dropdown interaction | Narrowed member-or-role select submission, or empty if not one. Picked members and picked roles are kept in two separate lists. May be empty. |
Treat interaction as modal submit
Narrow a generic interaction to a modal submission. Returns nothing if the interaction is a different kind.
Inputs
| Name | Type | Required | Details |
|---|---|---|---|
| Interaction | Interaction | Yes | Interaction to narrow. |
Outputs
| Name | Type | Details |
|---|---|---|
| Modal submit interaction | Modal submit | Narrowed modal submission, or empty if not a modal submit. May be empty. |
Treat interaction as slash command
Narrow a generic interaction to a slash command invocation. Returns nothing if the interaction is a different kind.
Inputs
| Name | Type | Required | Details |
|---|---|---|---|
| Interaction | Interaction | Yes | Interaction to narrow. |
Outputs
| Name | Type | Details |
|---|---|---|
| Slash command interaction | Slash command | Narrowed slash command, or empty if not a slash command. May be empty. |