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_application_command_acknowledge(interaction_event, ...)

Acknowledges the given application command interaction.

This method is a coroutine.

ParameterTypeOptionalKeyword onlyDefaultDescription
interaction_event

InteractionEvent

Interaction to acknowledge

wait

bool

True

Whether the interaction should be ensured asynchronously.

show_for_invoking_user_only

bool

False

Whether the sent message should only be shown to the invoking user. Defaults to False.

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_application_command_autocomplete(interaction_event, choices)

Forwards auto completion choices for the user.

This method is a coroutine.

ParameterTypeDescription
interaction_event

InteractionEvent

Interaction to acknowledge

choices

None, iterable of str

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_component_acknowledge(interaction_event, ...)

Acknowledges the given component interaction.

This method is a coroutine.

ParameterTypeOptionalDefaultDescription
interaction_event

InteractionEvent

Interaction to acknowledge

wait

bool

True

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_component_message_edit(interaction_event, ...)

Edits the given component interaction's source message.

This method is a coroutine.

ParameterTypeOptionalKeyword onlyDescription
interaction_event

InteractionEvent

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

None, AllowedMentionProxy, str, UserBase, Role, list of (str, UserBase, Role)

Which user or role can the message ping (or everyone). Check parse_allowed_mentions for details.

components

None, Component, (tuple | list)<Component, (tuple | list)<Component>>

Components attached to the message.

Pass it as None remove the actual ones.

content

None, str

The new content of the message.

embed

None, Embed

Alternative for embeds.

embeds

None, list<Embed>

The new embedded content of the message.

By passing it as None, you can remove the old.

flags

int, MessageFlag

The message's new flags.

suppress_embeds

bool

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_followup_message_create(interaction_event, ...)

Sends a followup message with the given interaction.

This method is a coroutine.

ParameterTypeOptionalKeyword onlyDefaultDescription
interaction_event

InteractionEvent

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

None, AllowedMentionProxy, str, UserBase, Role, list of (str, UserBase, Role)

Which user or role can the message ping (or everyone). Check parse_allowed_mentions for details.

attachments

None, object

Attachments to send.

components

None, Component, (tuple | list)<Component, (tuple | list)<Component>>

Components attached to the message.

content

None, str

The message's content if given.

embed

None, Embed

Alternative for embeds.

embeds

None, list<Embed>

The new embedded content of the message.

file

None, object

Alternative for attachments.

files

None, object

Alternative for attachments.

flags

int, MessageFlag

The message's flags.

show_for_invoking_user_only

bool

False

Whether the sent message should only be shown to the invoking user.

silent

bool

False

Whether the message should be delivered silently.

suppress_embeds

bool

False

Whether the message's embeds should be suppressed initially.

tts

bool

False

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_followup_message_delete(interaction_event, message)

Deletes an interaction's followup message.

This method is a coroutine.

ParameterTypeDescription
interaction_event

InteractionEvent

Interaction with what the followup message was sent with.

message

Message, int

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_followup_message_edit(interaction_event, message, ...)

Edits the given interaction followup message.

This method is a coroutine.

ParameterTypeOptionalKeyword onlyDescription
interaction_event

InteractionEvent

Interaction with what the followup message was sent with.

message

Message, int

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

None, AllowedMentionProxy, str, UserBase, Role, list of (str, UserBase, Role)

Which user or role can the message ping (or everyone). Check parse_allowed_mentions for details.

attachments

None, object

Attachments to send.

components

None, Component, (tuple | list)<Component, (tuple | list)<Component>>

Components attached to the message.

Pass it as None remove the actual ones.

content

None, str

The new content of the message.

embed

None, Embed

Alternative for embeds.

embeds

None, list<Embed>

The new embedded content of the message.

By passing it as None, you can remove the old.

file

None, object

Alternative for attachments.

files

None, object

Alternative for attachments.

flags

int, MessageFlag

The message's new flags.

suppress_embeds

bool

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_followup_message_get(interaction_event, message_id)

Gets a previously sent message with an interaction.

This method is a coroutine.

ParameterTypeDescription
interaction_event

InteractionEvent

Interaction with what the followup message was sent with.

message_id

int

The webhook's message's identifier to get.

Returns

message : Message

Raises

TypeError

  • If message_id was not given as int.

ConnectionError

No internet connection.

DiscordException

If any exception was received from the Discord API.

interaction_form_send(interaction_event, form)

Responds on an interaction with a form.

This function is a coroutine.

ParameterTypeDescription
interaction_event

InteractionEvent

Interaction to respond to.

form

InteractionForm

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_require_subscription(interaction_event)

Requires the user to subscribe to the application.

This method is a coroutine.

ParameterTypeDescription
interaction_event

InteractionEvent

Interaction to respond to.

Raises

ConnectionError

No internet connection.

DiscordException

If any exception was received from the Discord API.

interaction_response_message_create(interaction_event, ...)

Sends 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.

ParameterTypeOptionalKeyword onlyDefaultDescription
interaction_event

InteractionEvent

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

None, AllowedMentionProxy, str, UserBase, Role, list of (str, UserBase, Role)

Which user or role can the message ping (or everyone). Check parse_allowed_mentions for details.

components

None, Component, (tuple | list)<Component, (tuple | list)<Component>>

Components attached to the message.

content

None, str

The message's content if given.

embed

None, Embed

Alternative for embeds.

embeds

None, list<Embed>

The new embedded content of the message.

flags

int, MessageFlag

The message's flags.

show_for_invoking_user_only

bool

False

Whether the sent message should only be shown to the invoking user.

silent

bool

False

Whether the message should be delivered silently.

suppress_embeds

bool

False

Whether the message's embeds should be suppressed initially.

tts

bool

False

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_response_message_delete(interaction_event)

Deletes the given interaction 's source response message.

This method is a coroutine.

ParameterTypeDescription
interaction_event

InteractionEvent

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_response_message_edit(interaction_event, ...)

Edits 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.

ParameterTypeOptionalKeyword onlyDescription
interaction_event

InteractionEvent

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

None, AllowedMentionProxy, str, UserBase, Role, list of (str, UserBase, Role)

Which user or role can the message ping (or everyone). Check parse_allowed_mentions for details.

attachments

None, object

Attachments to send.

components

None, Component, (tuple | list)<Component, (tuple | list)<Component>>

Components attached to the message.

Pass it as None remove the actual ones.

content

None, str

The new content of the message.

embed

None, Embed

Alternative for embeds.

embeds

None, list<Embed>

The new embedded content of the message.

By passing it as None, you can remove the old.

file

None, object

Alternative for attachments.

files

None, object

Alternative for attachments.

flags

int, MessageFlag

The message's new flags.

suppress_embeds

bool

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_response_message_get(interaction_event)

Gets the given interaction 's source response message.

This method is a coroutine.

ParameterTypeDescription
interaction_event

InteractionEvent

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.