Pincer Objects Events Section¶
Channel¶
ChannelPinsUpdateEvent¶
- class ChannelPinsUpdateEvent¶
Bases:
pincer.utils.api_object.APIObject
Sent when a message is pinned or unpinned in a text channel. This is not sent when a pinned message is deleted.
Error¶
DiscordError¶
- class DiscordError¶
Bases:
pincer.exceptions.PincerError
,pincer.utils.api_object.APIObject
Represents an error event in the Discord Gateway.
Gateway Commands¶
Identify¶
- class Identify¶
Bases:
pincer.utils.api_object.APIObject
Used to trigger the initial handshake with the gateway.
- large_threshold¶
Value between 50 and 250, total number of members where the gateway will stop sending offline members in the guild member list
- Type
APINullable[
int
]
- presence¶
Presence structure for initial presence information
- Type
APINullable[Any]
Resume¶
Guild¶
GuildBanAddEvent¶
GuildBanRemoveEvent¶
GuildEmojisUpdateEvent¶
GuildStickersUpdateEvent¶
GuildIntegrationsUpdateEvent¶
- class GuildIntegrationsUpdateEvent¶
Bases:
pincer.utils.api_object.APIObject
Sent when a guild integration is updated.
GuildMemberRemoveEvent¶
GuildMemberUpdateEvent¶
- class GuildMemberUpdateEvent¶
Bases:
pincer.utils.api_object.APIObject
Sent when a guild member is updated. This will also fire when the user object of a guild member changes.
when the user started boosting the guild
- Type
APINullable[Optional[
Timestamp
]]
GuildMembersChunkEvent¶
- class GuildMembersChunkEvent¶
Bases:
pincer.utils.api_object.APIObject
Sent in response to Guild Request Members. You can use the
chunk_index
andchunk_count
to calculate how many chunks are left for your request.- members¶
Set of guild members
- Type
List[
GuildMember
]
- chunk_index¶
The chunk index in the expected chunks for this response (0 <= chunk_index < chunk_count)
- Type
- not_found¶
If passing an invalid id to
REQUEST_GUILD_MEMBERS
, it will be returned here- Type
APINullable[List[Any]]
- presences¶
If passing true to
REQUEST_GUILD_MEMBERS
, presences of the returned members will be here- Type
APINullable[
PresenceUpdateEvent
]
GuildRoleCreateEvent¶
GuildRoleUpdateEvent¶
GuildRoleDeleteEvent¶
Hello Ready¶
HelloEvent¶
- class HelloEvent¶
Bases:
pincer.utils.api_object.APIObject
Sent on connection to the websocket. Defines the heartbeat interval that the client should heartbeat to.
ReadyEvent¶
- class ReadyEvent¶
Bases:
pincer.utils.api_object.APIObject
Dispatched when a client has completed the initial handshake with the gateway (for new sessions).
- application¶
Contains
id
andflags
- Type
integration¶
IntegrationDeleteEvent¶
Invite¶
InviteCreateEvent¶
- class InviteCreateEvent¶
Bases:
pincer.utils.api_object.APIObject
Sent when a new invite to a channel is created.
- temporary¶
Whether or not the invite is temporary (invited users will be kicked on disconnect unless they’re assigned a role)
- Type
- target_type¶
The type of target for this voice channel invite
- Type
APINullable[
InviteTargetType
]
InviteDeleteEvent¶
Message¶
MessageDeleteEvent¶
MessageDeleteBulkEvent¶
MessageReactionAddEvent¶
- class MessageReactionAddEvent¶
Bases:
pincer.utils.api_object.APIObject
Sent when a user adds a reaction to a message.
- member¶
The member who reacted if this happened in a guild
- Type
MessageReactionRemoveEvent¶
- class MessageReactionRemoveEvent¶
Bases:
pincer.utils.api_object.APIObject
Sent when a user removes a reaction from a message.
MessageReactionRemoveAllEvent¶
MessageReactionRemoveEmojiEvent¶
- class MessageReactionRemoveEmojiEvent¶
Bases:
pincer.utils.api_object.APIObject
Sent when a bot removes all instances of a given emoji from the reactions of a message.
Presence¶
ActivityType¶
- class ActivityType¶
Bases:
enum.IntEnum
Represents the enum of the type of activity.
- GAME¶
Playing {name}; e.g. “Playing Rocket League”
- STREAMING¶
Streaming {details}; e.g. “Streaming Rocket League”; Only supports Twitch and YouTube.
- LISTENING¶
Listening to {name}; e.g. “Listening to Spotify”
- WATCHING¶
Watching {name}; e.g. “Watching YouTube Together”
- CUSTOM¶
{emoji} {name}; e.g. “:smiley: I am cool”; Not for bots; discord limitation
- COMPETING¶
Competing in {name}; e.g. “Competing in Arena World Champions”
ActivityTimestamp¶
ActivityEmoji¶
ActivityParty¶
ActivityAssets¶
- class ActivityAssets¶
Bases:
pincer.utils.api_object.APIObject
Represents an asset of an activity.
ActivitySecrets¶
ActivityFlags¶
- class ActivityFlags¶
Bases:
enum.IntEnum
An enumeration.
Activity¶
- class Activity¶
Bases:
pincer.utils.api_object.APIObject
Bots are only able to send
name
,type
, and optionallyurl
.- type¶
Activity type
- Type
- created_at¶
Unix timestamp (in milliseconds) of when the activity was added to the user’s session
- Type
- timestamps¶
Unix timestamps for start and/or end of the game
- Type
APINullable[
ActivityTimestamp
]
- emoji¶
The emoji used for a custom status
- Type
APINullable[Optional[
ActivityEmoji
]]
- party¶
Information for the current party of the player
- Type
APINullable[
ActivityParty
]
- assets¶
Images for the presence and their hover texts
- Type
APINullable[
ActivityAssets
]
- secrets¶
Secrets for Rich Presence joining and spectating
- Type
APINullable[
ActivitySecrets
]
- flags¶
Activity flags
OR
d together, describes what the payload includes- Type
APINullable[
ActivityFlags
]
- buttons¶
The url button on an activity.
- Type
APINullable[List[
ActivityButton
]]
ClientStatus¶
- class ClientStatus¶
Bases:
pincer.utils.api_object.APIObject
Active sessions are indicated with an “online”, “idle”, or “dnd” string per platform. If a user is offline or invisible, the corresponding field is not present.
- desktop¶
The user’s status set for an active desktop (Windows, Linux, Mac) application session
- Type
APINullable[
str
]
PresenceUpdateEvent¶
- class PresenceUpdateEvent¶
Bases:
pincer.utils.api_object.APIObject
This event is sent when a user’s presence or info, such as name or avatar, is updated.
- client_status¶
User’s platform-dependent status
- Type
Thread¶
ThreadListSyncEvent¶
- class ThreadListSyncEvent¶
Bases:
pincer.utils.api_object.APIObject
Sent when the current user gains access to a channel.
- threads¶
All active threads in the given channels that the current user can access
- Type
List[
Channel
]
- members¶
All thread member objects from the synced threads for the current user, indicating which threads the current user has been added to
- Type
List[
ThreadMember
]
ThreadMembersUpdateEvent¶
- class ThreadMembersUpdateEvent¶
Bases:
pincer.utils.api_object.APIObject
Sent when anyone is added to or removed from a thread. If the current user does not have the GUILD_MEMBERS Gateway Intent, then this event will only be sent if the current user was added to or removed from the thread.
- added_members¶
The users who were added to the thread
- Type
APINullable[List[
ThreadMember
]]
Typing Start¶
TypingStartEvent¶
- class TypingStartEvent¶
Bases:
pincer.utils.api_object.APIObject
Sent when a user starts typing in a channel.
- member¶
The member who started typing if this happened in a guild
- Type
APINullable[
GuildMember
]
Voice¶
VoiceServerUpdateEvent¶
- class VoiceServerUpdateEvent¶
Bases:
pincer.utils.api_object.APIObject
Sent when a guild’s voice server is updated. This is sent when initially connecting to voice, and when the current voice instance fails over to a new server.