Pincer Objects Events#
Channel#
ChannelPinsUpdateEvent#
- class ChannelPinsUpdateEvent#
Bases:
pincer.utils.api_object.APIObject,pincer.utils.api_object.ChannelProperty,pincer.utils.api_object.GuildPropertySent 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.APIObjectRepresents an error event in the Discord Gateway.
Gateway Commands#
Identify#
- class Identify#
Bases:
pincer.utils.api_object.APIObjectUsed 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#
- class GuildBanAddEvent#
Bases:
pincer.utils.api_object.APIObject,pincer.utils.api_object.GuildPropertySent when a user is banned from a guild.
GuildBanRemoveEvent#
- class GuildBanRemoveEvent#
Bases:
pincer.utils.api_object.APIObject,pincer.utils.api_object.GuildPropertySent when a user is unbanned from a guild.
GuildEmojisUpdateEvent#
- class GuildEmojisUpdateEvent#
Bases:
pincer.utils.api_object.APIObject,pincer.utils.api_object.GuildPropertySent when a guild’s emojis have been updated.
GuildStickersUpdateEvent#
- class GuildStickersUpdateEvent#
Bases:
pincer.utils.api_object.APIObject,pincer.utils.api_object.GuildPropertySent when a guild’s stickers have been updated.
GuildIntegrationsUpdateEvent#
- class GuildIntegrationsUpdateEvent#
Bases:
pincer.utils.api_object.APIObject,pincer.utils.api_object.GuildPropertySent when a guild integration is updated.
GuildMemberRemoveEvent#
- class GuildMemberRemoveEvent#
Bases:
pincer.utils.api_object.APIObject,pincer.utils.api_object.GuildPropertySent when a user is removed from a guild (leave/kick/ban).
GuildMemberUpdateEvent#
- class GuildMemberUpdateEvent#
Bases:
pincer.utils.api_object.APIObject,pincer.utils.api_object.GuildPropertySent 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,pincer.utils.api_object.GuildPropertySent in response to Guild Request Members. You can use the
chunk_indexandchunk_countto 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#
- class GuildRoleCreateEvent#
Bases:
pincer.utils.api_object.APIObject,pincer.utils.api_object.GuildPropertySent when a guild role is created.
GuildRoleUpdateEvent#
- class GuildRoleUpdateEvent#
Bases:
pincer.utils.api_object.APIObject,pincer.utils.api_object.GuildPropertySent when a guild role is updated.
GuildRoleDeleteEvent#
- class GuildRoleDeleteEvent#
Bases:
pincer.utils.api_object.APIObject,pincer.utils.api_object.GuildPropertySent when a guild role is deleted.
Hello Ready#
HelloEvent#
- class HelloEvent#
Bases:
pincer.utils.api_object.APIObjectSent on connection to the websocket. Defines the heartbeat interval that the client should heartbeat to.
ReadyEvent#
- class ReadyEvent#
Bases:
pincer.utils.api_object.APIObjectDispatched when a client has completed the initial handshake with the gateway (for new sessions).
- application#
Contains
idandflags- Type
integration#
IntegrationDeleteEvent#
- class IntegrationDeleteEvent#
Bases:
pincer.utils.api_object.APIObject,pincer.utils.api_object.GuildPropertySent when an integration is deleted.
Invite#
InviteCreateEvent#
- class InviteCreateEvent#
Bases:
pincer.utils.api_object.APIObject,pincer.utils.api_object.ChannelProperty,pincer.utils.api_object.GuildPropertySent when a new invite to a channel is created.
- temporary#
Whether 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#
- class InviteDeleteEvent#
Bases:
pincer.utils.api_object.APIObject,pincer.utils.api_object.ChannelProperty,pincer.utils.api_object.GuildPropertySent when an invite is deleted.
Message#
MessageDeleteEvent#
- class MessageDeleteEvent#
Bases:
pincer.utils.api_object.APIObject,pincer.utils.api_object.ChannelProperty,pincer.utils.api_object.GuildPropertySent when a message is deleted.
MessageDeleteBulkEvent#
- class MessageDeleteBulkEvent#
Bases:
pincer.utils.api_object.APIObject,pincer.utils.api_object.ChannelProperty,pincer.utils.api_object.GuildPropertySent when multiple messages are deleted at once.
MessageReactionAddEvent#
- class MessageReactionAddEvent#
Bases:
pincer.utils.api_object.APIObject,pincer.utils.api_object.ChannelProperty,pincer.utils.api_object.GuildPropertySent 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,pincer.utils.api_object.ChannelProperty,pincer.utils.api_object.GuildPropertySent when a user removes a reaction from a message.
MessageReactionRemoveAllEvent#
- class MessageReactionRemoveAllEvent#
Bases:
pincer.utils.api_object.APIObject,pincer.utils.api_object.ChannelProperty,pincer.utils.api_object.GuildPropertySent when a user explicitly removes all reactions from a message.
MessageReactionRemoveEmojiEvent#
- class MessageReactionRemoveEmojiEvent#
Bases:
pincer.utils.api_object.APIObject,pincer.utils.api_object.ChannelProperty,pincer.utils.api_object.GuildPropertySent when a bot removes all instances of a given emoji from the reactions of a message.
Presence#
ActivityType#
- class ActivityType#
Bases:
enum.IntEnumRepresents 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.APIObjectRepresents an asset of an activity.
ActivitySecrets#
ActivityFlags#
- class ActivityFlags#
Bases:
objectThere is no information on what the flags are in the Discord API docs. https://discord.dev/topics/gateway#activity-object-activity-flags
Activity#
- class Activity#
Bases:
pincer.utils.api_object.APIObjectBots 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
ORd 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.APIObjectActive 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,pincer.utils.api_object.GuildPropertyThis 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,pincer.utils.api_object.GuildPropertySent 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,pincer.utils.api_object.GuildPropertySent 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,pincer.utils.api_object.ChannelProperty,pincer.utils.api_object.GuildPropertySent 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,pincer.utils.api_object.GuildPropertySent 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.
Webhook#
WebhooksUpdateEvent#
- class WebhooksUpdateEvent#
Bases:
pincer.utils.api_object.APIObject,pincer.utils.api_object.ChannelPropertySent when a guild’s channel webhook is created, updated, or deleted.