Skip to content

Message Events

Note

The following classes come from the discord.events.message_events module.


MessageCreateEvent dataclass

Received when a message is created.

message: Message instance-attribute

Message resource object. See Resource.Message.

guild_id: Optional[int] instance-attribute

Guild ID of the updated message (if in a guild channel).

member: Optional[MemberModel] instance-attribute

Partial Member object of the author of the message. See MemberModel.


MessageUpdateEvent dataclass

Received when a message is updated.

message: Message instance-attribute

Message resource object. See Resource.Message.

guild_id: Optional[int] instance-attribute

Guild ID of the updated message (if in a guild channel).

member: Optional[MemberModel] instance-attribute

Partial Member object of the author of the message. See MemberModel.


MessageDeleteEvent dataclass

Received when a message is deleted.

id: int instance-attribute

ID of the deleted message.

channel_id: int instance-attribute

Channel ID of the deleted message.

guild_id: Optional[int] instance-attribute

Guild ID of the deleted message (if in a guild channel).