ClientCompoundInteractionEndpoints
Methods
()
__new__Compound components do not support instancing.
Sub-typing is supported, but the attributes are only proxied. Sub-types have no meaning by themselves.
Raises
RuntimeError
(interaction_event, ...)
interaction_application_command_acknowledgeAcknowledges the given application command interaction.
This method is a coroutine.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
interaction_event | Interaction to acknowledge | ||||
wait |
|
| Whether the interaction should be ensured asynchronously. | ||
show_for_invoking_user_only |
|
| Whether the sent message should only be shown to the invoking user. Defaults to |
Raises
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
Notes
If the interaction is already timed or out or was used, you will get:
DiscordException Not Found (404), code = 10062: Unknown interaction
(interaction_event, choices)
interaction_application_command_autocompleteForwards auto completion choices for the user.
This method is a coroutine.
Parameter | Type | Description |
---|---|---|
interaction_event | Interaction to acknowledge | |
choices |
| Choices to show for the user. |
Raises
TypeError
If choice
is neither None
nor iterable
.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
Notes
If the interaction is already timed or out or was used, you will get:
DiscordException Not Found (404), code = 10062: Unknown interaction
(interaction_event, ...)
interaction_component_acknowledgeAcknowledges the given component interaction.
This method is a coroutine.
Parameter | Type | Optional | Default | Description |
---|---|---|---|---|
interaction_event | Interaction to acknowledge | |||
wait |
|
| Whether the interaction should be ensured asynchronously. |
Raises
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
Notes
If the interaction is already timed or out or was used, you will get:
DiscordException Not Found (404), code = 10062: Unknown interaction
(interaction_event, ...)
interaction_component_message_editEdits the given component interaction's source message.
This method is a coroutine.
Parameter | Type | Optional | Keyword only | Description |
---|---|---|---|---|
interaction_event | Interaction, what's source response message will be edited. | |||
*positional_parameters | Positional parameters | Additional parameters to edit the message with. | ||
**keyword_parameters | Keyword parameters | Additional parameters to edit the message with. | ||
allowed_mentions |
| Which user or role can the message ping (or everyone). Check | ||
components |
| Components attached to the message. Pass it as | ||
content |
| The new content of the message. | ||
embed |
| Alternative for | ||
embeds |
| The new embedded content of the message. By passing it as | ||
flags |
| The message's new flags. | ||
suppress_embeds |
| Whether the message's embeds should be suppressed or unsuppressed. |
Raises
TypeError
- If a parameter's type is incorrect.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(interaction_event, ...)
interaction_followup_message_createSends a followup message with the given interaction.
This method is a coroutine.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
interaction_event | Interaction to create followup message with. | ||||
*positional_parameters | Positional parameters | Additional parameters to create the message with. | |||
**keyword_parameters | Keyword parameters | Additional parameters to create the message with. | |||
allowed_mentions |
| Which user or role can the message ping (or everyone). Check | |||
attachments |
| Attachments to send. | |||
components |
| Components attached to the message. | |||
content |
| The message's content if given. | |||
embed |
| Alternative for | |||
embeds |
| The new embedded content of the message. | |||
file |
| Alternative for | |||
files |
| Alternative for | |||
flags |
| The message's flags. | |||
show_for_invoking_user_only |
|
| Whether the sent message should only be shown to the invoking user. | ||
silent |
|
| Whether the message should be delivered silently. | ||
suppress_embeds |
|
| Whether the message's embeds should be suppressed initially. | ||
tts |
|
| Whether the message is text-to-speech. |
Returns
message : None
, Message
Returns None
if there is nothing to send.
Raises
TypeError
- If a parameter's type is incorrect.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(interaction_event, message)
interaction_followup_message_deleteDeletes an interaction's followup message.
This method is a coroutine.
Parameter | Type | Description |
---|---|---|
interaction_event | Interaction with what the followup message was sent with. | |
message |
| The interaction followup's message to edit. |
Raises
TypeError
If message
was not given neither as Message
, int
.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(interaction_event, message, ...)
interaction_followup_message_editEdits the given interaction followup message.
This method is a coroutine.
Parameter | Type | Optional | Keyword only | Description |
---|---|---|---|---|
interaction_event | Interaction with what the followup message was sent with. | |||
message |
| The interaction followup's message to edit. | ||
*positional_parameters | Positional parameters | Additional parameters to edit the message with. | ||
**keyword_parameters | Keyword parameters | Additional parameters to edit the message with. | ||
allowed_mentions |
| Which user or role can the message ping (or everyone). Check | ||
attachments |
| Attachments to send. | ||
components |
| Components attached to the message. Pass it as | ||
content |
| The new content of the message. | ||
embed |
| Alternative for | ||
embeds |
| The new embedded content of the message. By passing it as | ||
file |
| Alternative for | ||
files |
| Alternative for | ||
flags |
| The message's new flags. | ||
suppress_embeds |
| Whether the message's embeds should be suppressed or unsuppressed. |
Raises
TypeError
- If a parameter's type is incorrect.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(interaction_event, message_id)
interaction_followup_message_getGets a previously sent message with an interaction.
This method is a coroutine.
Parameter | Type | Description |
---|---|---|
interaction_event | Interaction with what the followup message was sent with. | |
message_id |
| The webhook's message's identifier to get. |
Returns
message : Message
Raises
TypeError
- If
message_id
was not given asint
.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(interaction_event, form)
interaction_form_sendResponds on an interaction with a form.
This function is a coroutine.
Parameter | Type | Description |
---|---|---|
interaction_event | Interaction to respond to. | |
form | The to respond with. |
Raises
RuntimeError
If cannot respond with a form on the given interaction
.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
Notes
Discord do not returns message data, so the method cannot return a Message
either.
If the interaction is already timed or out or was used, you will get:
DiscordException Not Found (404), code = 10062: Unknown interaction
(interaction_event)
interaction_require_subscriptionRequires the user to subscribe to the application.
This method is a coroutine.
Parameter | Type | Description |
---|---|---|
interaction_event | Interaction to respond to. |
Raises
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(interaction_event, ...)
interaction_response_message_createSends an interaction response. After receiving an InteractionEvent
, you should acknowledge it within 3
seconds to perform followup actions.
Not like .message_create
, this endpoint can be called without any content to still acknowledge the interaction event. This method also wont return a Message
object (thank to Discord), but at least .interaction_followup_message_create
will. To edit or delete this message, you can use .interaction_response_message_edit
and .interaction_response_message_delete
.
This method is a coroutine.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
interaction_event | Interaction to respond to. | ||||
*positional_parameters | Positional parameters | Additional parameters to create the message with. | |||
**keyword_parameters | Keyword parameters | Additional parameters to create the message with. | |||
allowed_mentions |
| Which user or role can the message ping (or everyone). Check | |||
components |
| Components attached to the message. | |||
content |
| The message's content if given. | |||
embed |
| Alternative for | |||
embeds |
| The new embedded content of the message. | |||
flags |
| The message's flags. | |||
show_for_invoking_user_only |
|
| Whether the sent message should only be shown to the invoking user. | ||
silent |
|
| Whether the message should be delivered silently. | ||
suppress_embeds |
|
| Whether the message's embeds should be suppressed initially. | ||
tts |
|
| Whether the message is text-to-speech. |
Raises
TypeError
- If a parameter's type is incorrect.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
Notes
Discord do not returns message data, so the method cannot return a Message
either.
If the interaction is already timed or out or was used, you will get:
DiscordException Not Found (404), code = 10062: Unknown interaction
(interaction_event)
interaction_response_message_deleteDeletes the given interaction
's source response message.
This method is a coroutine.
Parameter | Type | Description |
---|---|---|
interaction_event | Interaction, what's source response message will be deleted. |
Raises
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(interaction_event, ...)
interaction_response_message_editEdits the given interaction
's source response. If the source interaction event was only deferred, this call will send the message as well.
This method is a coroutine.
Parameter | Type | Optional | Keyword only | Description |
---|---|---|---|---|
interaction_event | Interaction, what's source response message will be edited. | |||
*positional_parameters | Positional parameters | Additional parameters to edit the message with. | ||
**keyword_parameters | Keyword parameters | Additional parameters to edit the message with. | ||
allowed_mentions |
| Which user or role can the message ping (or everyone). Check | ||
attachments |
| Attachments to send. | ||
components |
| Components attached to the message. Pass it as | ||
content |
| The new content of the message. | ||
embed |
| Alternative for | ||
embeds |
| The new embedded content of the message. By passing it as | ||
file |
| Alternative for | ||
files |
| Alternative for | ||
flags |
| The message's new flags. | ||
suppress_embeds |
| Whether the message's embeds should be suppressed or unsuppressed. |
Raises
TypeError
- If a parameter's type is incorrect.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(interaction_event)
interaction_response_message_getGets the given interaction
's source response message.
This method is a coroutine.
Parameter | Type | Description |
---|---|---|
interaction_event | Interaction, what's source response message will be deleted. |
Returns
message : Message
The created message.
Raises
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.