Response¶
discord_http.response module¶
- class discord_http.response.AutocompleteResponse(choices)¶
Bases:
BaseResponseRepresents an autocomplete response.
- choices¶
A dictionary of choices, where keys are sent to Discord and values are shown to the user.
- to_multipart() MultipartWriter¶
Returns the multipart data.
- Return type:
MultipartWriter
- class discord_http.response.DeferResponse(*, thinking=False, ephemeral=False, flags=None)¶
Bases:
BaseResponseRepresents a response that defers the interaction.
- Parameters:
thinking (bool)
ephemeral (bool)
flags (MessageFlags | None)
- ephemeral¶
Whether the response is ephemeral or not.
- thinking¶
Whether the response is thinking or not.
- flags¶
The flags for the response.
- to_multipart() MultipartWriter¶
Returns the multipart data.
- Return type:
MultipartWriter
- 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:
content (str | None)
file (File | None)
embed (Embed | None)
attachment (File | None)
view (View | None)
tts (bool | None)
allowed_mentions (AllowedMentions | None)
message_reference (MessageReference | None)
poll (Poll | None)
type (ResponseType | int)
ephemeral (bool | None)
flags (MessageFlags | None)
- content¶
The content of the message.
- ephemeral¶
Whether the message should be ephemeral or not.
- tts¶
Whether the message should be sent as a TTS message.
- type¶
The type of the response. Defaults to ResponseType.message.
- allowed_mentions¶
Allowed mentions for the message.
- message_reference¶
A reference to another message, if applicable.
- poll¶
A poll to be sent with the message.
- flags¶
Flags for the message response.
- embeds¶
The embeds to be sent with the message. A single embed may be passed via embed instead.
- attachments¶
The attachments to be sent with the message. A single attachment may be passed via attachment instead.
- view¶
A view to be sent with the message.
- files¶
The files to be sent with the message. A single file may be passed via file instead.
- 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¶
The partial user object of the application.