Interactions

class discord_limits.paths.InteractionsPaths(client)
Parameters:

client (discord_limits.DiscordClient) – The DiscordClient instance to use.

async create_interaction_response(interaction_id, interaction_token, type, data=None)

Create an interaction response.

Parameters:
  • interaction_id (int) – The ID of the interaction to create the response for.

  • interaction_token (str) – The token of the interaction to create the response for.

  • type (int) – The type of response to create.

  • data (Any, optional) – An optional response message, by default None

Returns:

The response from Discord.

Return type:

ClientResponse

async get_original_interaction_response(application_id, interaction_token)

Get the original interaction response.

Parameters:
  • application_id (int) – The ID of the application to get the original interaction response for.

  • interaction_token (str) – The token of the interaction to get the original interaction response for.

Returns:

The response from Discord.

Return type:

ClientResponse

async edit_original_interaction_response(application_id, interaction_token, content=None, embeds=None, allowed_mentions=None, components=None)

Edit the original interaction response.

Parameters:
  • application_id (int) – The ID of the application to edit the original interaction response for.

  • interaction_token (str) – The token of the interaction to edit the original interaction response for.

  • content (str, optional) – The message contents (up to 2000 characters), by default None

  • embeds (List[dict], optional) – Embedded rich content, by default None

  • allowed_mentions (Any, optional) – Allowed mentions for the message, by default None

  • components (List[Any], optional) – The components to include with the message, by default None

Returns:

A message object.

Return type:

ClientResponse

async delete_original_interaction_response(application_id, interaction_token)

Delete the original interaction response.

Parameters:
  • application_id (int) – The ID of the application to delete the original interaction response for.

  • interaction_token (str) – The token of the interaction to delete the original interaction response for.

Returns:

The response from Discord.

Return type:

ClientResponse

async create_followup_message(application_id, interaction_token, content=None, tts=None, embeds=None, allowed_mentions=None, components=None)

Create a followup message.

Parameters:
  • application_id (int) – The ID of the application to create the followup message for.

  • interaction_token (str) – The token of the interaction to create the followup message for.

  • content (str, optional) – The message contents (up to 2000 characters), by default None

  • tts (bool, optional) – True if this is a TTS message, by default None

  • embeds (List[dict], optional) – Embedded rich content, by default None

  • allowed_mentions (Any, optional) – Allowed mentions for the message, by default None

  • components (List[Any], optional) – The components to include with the message, by default None

Returns:

A message object.

Return type:

ClientResponse

async get_followup_message(application_id, interaction_token, message_id)

Get a followup message.

Parameters:
  • application_id (int) – The ID of the application to get the followup message for.

  • interaction_token (str) – The token of the interaction to get the followup message for.

  • message_id (int) – The ID of the message to get.

Returns:

The response from Discord.

Return type:

ClientResponse

async edit_followup_message(application_id, interaction_token, message_id, content=None, embeds=None, allowed_mentions=None, components=None)

Edit a followup message.

Parameters:
  • application_id (int) – The ID of the application to edit the followup message for.

  • interaction_token (str) – The token of the interaction to edit the followup message for.

  • message_id (int) – The ID of the message to edit.

  • content (str, optional) – The message contents (up to 2000 characters), by default None

  • embeds (List[dict], optional) – Embedded rich content, by default None

  • allowed_mentions (Any, optional) – Allowed mentions for the message, by default None

  • components (List[Any], optional) – The components to include with the message, by default None

Returns:

A message object.

Return type:

ClientResponse

async delete_followup_message(application_id, interaction_token, message_id, thread_id=None)

Delete a followup message.

Parameters:
  • application_id (int) – The ID of the application to delete the followup message for.

  • interaction_token (str) – The token of the interaction to delete the followup message for.

  • message_id (int) – The ID of the message to delete.

  • thread_id (id, optional) – ID of the thread the message is in, by default None

Returns:

The response from Discord.

Return type:

ClientResponse