Object (Gateway events)

discord_http.gateway.object module

class discord_http.gateway.object.AutomodExecution(*, state, guild, channel, user, data)

Bases: object

Parameters:
property rule: PartialAutoModRule

Returns a partial object of automod rule.

class discord_http.gateway.object.BulkDeletePayload(*, state, data, guild, channel)

Bases: object

Parameters:
class discord_http.gateway.object.ChannelPinsUpdate(channel, last_pin_timestamp, guild)

Bases: object

Represents a channel pins update event.

Parameters:
channel

The channel the pins were updated in.

last_pin_timestamp

The last time a pin was updated in the channel.

guild

The guild the channel is in. If the channel is a DM channel, this will be None.

class discord_http.gateway.object.GuildJoinRequest(*, state, guild, data)

Bases: object

Parameters:
class discord_http.gateway.object.PlayingStatus(*, name=None, status=None, type=None, url=None)

Bases: object

Parameters:
to_dict() dict

The playing status as a dictionary.

Return type:

dict

class discord_http.gateway.object.PollVoteEvent(*, state, user, channel, guild, type, data)

Bases: object

Parameters:
class discord_http.gateway.object.Presence(*, state, user, guild, data)

Bases: object

Parameters:
class discord_http.gateway.object.Reaction(*, state, data)

Bases: object

Parameters:
property channel: PartialChannel | None

Returns the channel the message was sent in.

If guild and channel cache is enabled, it can also return full channel object.

property guild: Guild | PartialGuild | None

The guild the message was sent in.

property message: PartialMessage | None

Returns the message if a message_id is available.

class discord_http.gateway.object.ThreadListSyncPayload(*, state, data)

Bases: object

Represents a thread list sync payload.

Parameters:
guild_id

The guild ID the threads are in.

channel_ids

The parent channel IDs whose threads are being synced. If this is empty, it means all threads in the guild are being synced.

This may contains ids of channels that have no active threads.

Type:

]

property channels: list[PartialChannel]

The channels in the thread list.

combined() Iterator[tuple[PartialChannel, tuple[Thread, list[PartialThreadMember]]]]

Returns a combined iterator of channels and threads.

Return type:

Iterator[tuple[PartialChannel, tuple[Thread, list[PartialThreadMember]]]]

property guild: PartialGuild

The guild the thread is in.

property members: list[PartialThreadMember]

The members in the thread list.

property threads: list[Thread]

The threads in the thread list.

class discord_http.gateway.object.ThreadMembersUpdatePayload(*, state, data)

Bases: object

Represents a thread members update’s payload.

Parameters:
id

The ID of the thread.

guild_id

The guild ID the thread is in.

member_count

The total number of members in the thread, capped at 50.

removed_member_ids

The IDs of the members that were removed from the thread.

property added_members: list[ThreadMember]

The members that were added to the thread.

Type:

list[PartialThreadMember]

property guild: PartialGuild

The guild the thread is in.

property removed_members: list[PartialMember]

The members that were removed from the thread.

Type:

list[PartialMember]

property thread: PartialChannel | Thread

The thread the members were updated in.

class discord_http.gateway.object.TypingStartEvent(*, guild, channel, user, timestamp)

Bases: object

Represents a typing start event.

Parameters:
guild

The guild the typing event was triggered in. If the channel is a DM channel, this will be None.

channel

The channel the typing event was triggered in.

user

The user that started typing.

timestamp

The time the user started typing.