Message¶
- async create_reaction
- async delete
- async edit_message
- async remove_reactions
- async remove_reactions_by_emoji
- async reply
- class quant.Message(*, type: int = None, timestamp: datetime = None, channel_id: Snowflake | None = None, position: Snowflake | None = None, id: Snowflake | None = None, guild_id: Snowflake | None = None, member: GuildMember | None = None, author: User | None = None, content: str | None = None, nonce: str | int | None = None, tts: bool | None = None, embeds: List[Embed] | None = None, edited_timestamp: str = None, mention_everyone: bool | None = None, mentions: List[User] | None = None, mention_roles: List[Any] | None = None, mention_channels: List[Any] | None = None, message_reference: Any | None = None, components: ActionRow | None = None, stickers: List[Any] | None = None, attachments: List[Attachment] | None = None, flags: int | None = None, referenced_message: Self | None = None, pinned: bool = False, webhook_id: Snowflake | None = None, activity: Any | None = None, application: Any | None = None, application_id: Snowflake | None = None, interaction: Interaction = None, thread: Thread | None = None, sticker_items: List[Any] | None = None, role_subscription_data: Any | None = None, resolved: bool | None = None)¶
Bases:
BaseModelRepresents a discord message.
Parameters¶
- type:
int Message type.
- timestamp:
datetime Timestamp of the message.
- channel_id:
Snowflake ID of the channel where the message was sent.
- position:
Snowflake Position of the message in the channel.
- id:
Snowflake Unique ID of the message.
- guild_id:
Snowflake ID of the guild where the message was sent.
- member:
GuildMember Member who sent the message.
- author:
User User who sent the message.
- content:
str Content of the message.
- nonce:
str Nonce of the message.
- tts:
bool Whether the message is text-to-speech.
- embeds:
List[Embed] List of embedded content in the message.
- edited_timestamp:
str Timestamp when the message was edited.
- mention_everyone:
bool Whether the message mentions everyone.
- mentions:
List[User] List of users mentioned in the message.
- mention_roles:
List[Any] List of roles mentioned in the message.
- mention_channels:
List[Any] List of channels mentioned in the message.
- message_reference:
Any Reference to another message.
- components:
ActionRow Action row components in the message.
- stickers:
List[Any] List of stickers in the message.
- attachments:
List[Attachment] List of attachments in the message.
- flags:
int Message flags.
- referenced_message:
Self Reference to another message.
- pinned:
bool Whether the message is pinned.
- webhook_id:
Snowflake ID of the webhook that sent the message.
- activity:
Any Activity associated with the message.
- application:
Any Application associated with the message.
- application_id:
Snowflake ID of the application associated with the message.
- interaction:
Interaction Interaction associated with the message.
- thread:
Thread Thread associated with the message.
- sticker_items:
List[Any] List of sticker items in the message.
- role_subscription_data:
Any Role subscription data associated with the message.
- resolved:
bool Whether the message is resolved.
- async create_reaction(emoji: Emoji) None¶
This is a coroutine function
Add message reaction
Parameters¶
emoji:
Emoji
- async delete(*, reason: str | None = None, delete_after: int = 0) None¶
This is a coroutine function
Delete a message
Parameters¶
- async edit_message(content: str = None, embed: Embed = None, embeds: List[Embed] = None, flags: MessageFlags = MessageFlags.NONE, allowed_mentions: AllowedMentions = None, components: ActionRow = None) Self¶
This is a coroutine function
Edits message
Parameters¶
content:
strembed:Embedembeds:Embedsflags:MessageFlagsallowed_mentions:AllowedMentionscomponents:ActionRow
- async remove_reactions_by_emoji(emoji: int | Snowflake | Emoji) None¶
This is a coroutine function
Remove all reactions with similar emoji
Parameters¶
emoji:
Snowflake | int | Emoji
- async reply(content: str | None = None, nonce: str | int | None = None, tts: bool = False, embed: Embed | None = None, embeds: List[Embed] | None = None, allowed_mentions: AllowedMentions | None = None, components: ActionRow | None = None, sticker_ids: List = None, files: List[Any] | None = None, payload_json: str | None = None, attachments: List[Attachment] | None = None, flags: int | None = None) Self¶
This is a coroutine function
Reply the message
- type: