Response¶
discord_http.response module¶
- class discord_http.response.AutocompleteResponse(choices)¶
Bases:
BaseResponseRepresents an autocomplete response.
- class discord_http.response.DeferResponse(*, ephemeral=False, thinking=False, flags=None)¶
Bases:
BaseResponseRepresents a response that defers the interaction.
- Parameters:
ephemeral (bool) – Whether the response is ephemeral or not.
thinking (bool) – Whether the response is thinking or not.
flags (MessageFlags) – The flags for the response.
- class discord_http.response.MessageResponse(content=<MISSING>, *, file=<MISSING>, files=<MISSING>, embed=<MISSING>, embeds=<MISSING>, attachment=<MISSING>, attachments=<MISSING>, view=<MISSING>, tts=False, allowed_mentions=<MISSING>, message_reference=<MISSING>, poll=<MISSING>, type=4, ephemeral=False, flags=<MISSING>)¶
Bases:
BaseResponseRepresents a message response.
- Parameters:
file (
File|None) – A single file to be sent with the message.files (
list[File] |None) – A list of files to be sent with the message.embed (
Embed|None) – A single embed to be sent with the message.embeds (
list[Embed] |None) – A list of embeds to be sent with the message.attachment (
File|None) – A single attachment to be sent with the message.attachments (
list[File] |None) – A list of attachments to be sent with the message.tts (
bool|None) – Whether the message should be sent as a TTS message.allowed_mentions (
AllowedMentions|None) – Allowed mentions for the message.message_reference (
MessageReference|None) – A reference to another message, if applicable.type (
ResponseType|int) – The type of the response. Defaults to ResponseType.message.ephemeral (
bool|None) – Whether the message should be ephemeral or not.flags (
MessageFlags|None) – Flags for the message response.
- class discord_http.response.Ping(*, state, data)¶
Bases:
SnowflakeRepresents a ping response from the Discord API.
Usually reserved for internal use.
- Parameters:
state (DiscordAPI)
data (dict)
- property application: PartialUser¶
Returns the user object of the bot.