Interaction
Interaction
Bases: Generic[ClientT]
Represents a Discord interaction.
An interaction happens when a user does an action that needs to be notified. Current examples are slash commands and components.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
int
|
The interaction's ID. |
type |
InteractionType
|
The interaction type. |
guild_id |
Optional[int]
|
The guild ID the interaction was sent from. |
channel |
Optional[Any]
|
The channel the interaction was sent from. |
application_id |
int
|
The application ID that the interaction was for. |
user |
Union[User, Member]
|
The user or member that sent the interaction. |
message |
Optional[Message]
|
The message that sent this interaction.
This is only available for :attr: |
token |
str
|
The token to continue the interaction. These are valid for 15 minutes. |
data |
dict
|
The raw interaction data. |
locale |
Locale
|
The locale of the user invoking the interaction. |
guild_locale |
Optional[Locale]
|
The preferred locale of the guild the interaction was sent from, if any. |
Source code in dismake/models/interaction.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | |
is_application_command
property
is_application_command: bool
Indicates whether this interaction is an Application Command Interaction.
is_autocomplete
property
is_autocomplete: bool
Indicates whether this interaction is a Application Command Autocomplete Interaction.
is_message_component
property
is_message_component: bool
Indicates whether this interaction is a Message Component Interaction.
is_modal_submit
property
is_modal_submit: bool
Indicates whether this interaction is a Modal submit Interaction.
is_ping
property
is_ping: bool
Indicates whether this interaction is a Ping Interaction.
is_responded
property
is_responded: bool
Indicates whether this interaction is responded.