Pincer Objects Guild Section¶
Audit Log¶
AuditLogEvent¶
- BOT_ADD
- CHANNEL_CREATE
- CHANNEL_DELETE
- CHANNEL_OVERWRITE_CREATE
- CHANNEL_OVERWRITE_DELETE
- CHANNEL_OVERWRITE_UPDATE
- CHANNEL_UPDATE
- EMOJI_CREATE
- EMOJI_DELETE
- EMOJI_UPDATE
- GUILD_UPDATE
- INTEGRATION_CREATE
- INTEGRATION_DELETE
- INTEGRATION_UPDATE
- INVITE_CREATE
- INVITE_DELETE
- INVITE_UPDATE
- MEMBER_BAN_ADD
- MEMBER_BAN_REMOVE
- MEMBER_DISCONNECT
- MEMBER_KICK
- MEMBER_MOVE
- MEMBER_PRUNE
- MEMBER_ROLE_UPDATE
- MEMBER_UPDATE
- MESSAGE_BULK_DELETE
- MESSAGE_DELETE
- MESSAGE_PIN
- MESSAGE_UNPIN
- ROLE_CREATE
- ROLE_DELETE
- ROLE_UPDATE
- STAGE_INSTANCE_CREATE
- STAGE_INSTANCE_DELETE
- STAGE_INSTANCE_UPDATE
- STICKER_CREATE
- STICKER_DELETE
- STICKER_UPDATE
- THREAD_CREATE1
- THREAD_DELETE1
- THREAD_UPDATE1
- WEBHOOK_CREATE
- WEBHOOK_DELETE
- WEBHOOK_UPDATE
- class AuditLogEvent¶
Bases:
enum.IntEnum
Audit log action type. This represents the action which got performed, and logged.
- GUILD_UPDATE¶
Guild updated.
- CHANNEL_CREATE¶
Channel created.
- CHANNEL_UPDATE¶
Channel updated.
- CHANNEL_DELETE¶
Channel deleted.
- CHANNEL_OVERWRITE_CREATE¶
Channel overwrites created.
- CHANNEL_OVERWRITE_UPDATE¶
Channel overwrites updated.
- CHANNEL_OVERWRITE_DELETE¶
Channel overwrites deleted.
- MEMBER_KICK¶
Member kicked.
- MEMBER_PRUNE¶
Members pruned.
- MEMBER_BAN_ADD¶
Member banned.
- MEMBER_BAN_REMOVE¶
Member unbanned.
- MEMBER_UPDATE¶
Member edit.
- MEMBER_ROLE_UPDATE¶
Member role change.
- MEMBER_MOVE¶
Member voice channel move.
- MEMBER_DISCONNECT¶
Member voice channel disconnect.
- BOT_ADD¶
Bot added.
- ROLE_CREATE¶
Role created.
- ROLE_UPDATE¶
Role updated.
- ROLE_DELETE¶
Role deleted.
- INVITE_CREATE¶
Invite created.
- INVITE_UPDATE¶
Invite updated.
- INVITE_DELETE¶
Invite deleted.
- WEBHOOK_CREATE¶
Webhook created.
- WEBHOOK_UPDATE¶
Webhook updated.
- WEBHOOK_DELETE¶
Webhook deleted.
- EMOJI_CREATE¶
Emoji created.
- EMOJI_UPDATE¶
Emoji updated.
- EMOJI_DELETE¶
Emoji deleted.
- MESSAGE_DELETE¶
Message deleted.
- MESSAGE_BULK_DELETE¶
Message bulk delete.
- MESSAGE_PIN¶
Message pinned.
- MESSAGE_UNPIN¶
Message unpinned.
- INTEGRATION_CREATE¶
Integration created.
- INTEGRATION_UPDATE¶
Integration updated.
- INTEGRATION_DELETE¶
Integration deleted.
- STAGE_INSTANCE_CREATE¶
Stage instance created.
- STAGE_INSTANCE_UPDATE¶
Stage instance updated.
- STAGE_INSTANCE_DELETE¶
Stage instance deleted.
- STICKER_CREATE¶
Sticker created.
- STICKER_UPDATE¶
Sticker updated.
- STICKER_DELETE¶
Sticker deleted.
- THREAD_CREATE1¶
Thread created.
- THREAD_UPDATE1¶
Thread updated.
- THREAD_DELETE1¶
Thread deleted.
AuditLogChange¶
AuditEntryInfo¶
- class AuditEntryInfo¶
Bases:
pincer.utils.api_object.APIObject
Represents Discord Optional Audit Entry Info
AuditLogEntry¶
- class AuditLogEntry¶
Bases:
pincer.utils.api_object.APIObject
Represents a Discord Audit Log Entry object.
- action_type¶
Type of action that occurred
- Type
- changes¶
Changes made to the target_id
- Type
APINullable[List[
AuditLogChange
]]
- options¶
Additional info for certain action types
- Type
APINullable[List[
AuditLogChange
]]
AuditLog¶
- class AuditLog¶
Bases:
pincer.utils.api_object.APIObject
Represents a Discord Audit Log object.
- webhooks: List[
Webhook
] list of webhooks found in the audit log
- users: List[
User
] list of users found in the audit log
- audit_log_entries: List[
AuditLogEntry
] list of audit log entries
- integrations: List[
Integration
] list of partial integration objects
- threads: List[
Channel
] list of threads found in the audit log
- webhooks: List[
Ban¶
Ban¶
Channel¶
ChannelType¶
- class ChannelType¶
Bases:
enum.IntEnum
Represents a channel its type.
- GUILD_TEXT¶
A text channel.
- DM¶
A DM channel.
- GUILD_VOICE¶
A voice channel.
- GROUP_DM¶
A group DM channel.
- GUILD_CATEGORY¶
A category channel.
- GUILD_NEWS¶
A news channel.
- GUILD_STORE¶
A store channel.
- GUILD_NEWS_THREAD¶
A news thread.
- GUILD_PUBLIC_THREAD¶
A public thread.
- GUILD_PRIVATE_THREAD¶
A private thread.
- GUILD_STAGE_VOICE¶
A stage channel.
Channel¶
- application_id
- bitrate
- default_auto_archive_duration
- guild_id
- icon
- id
- last_message_id
- last_pin_timestamp
- member
- member_count
- message_count
- name
- nsfw
- owner_id
- parent_id
- permission_overwrites
- permissions
- position
- rate_limit_per_user
- recipients
- rtc_region
- thread_metadata
- topic
- type
- user_limit
- video_quality_mode
- clsChannel.from_id
- asyncdelete
- asyncedit
- asyncsend
- class Channel¶
Bases:
pincer.utils.api_object.APIObject
Represents a Discord Channel Mention object
- type¶
The type of channel
- Type
- application_id¶
Application id of the group DM creator if it is bot-created
- Type
APINullable[
Snowflake
]
- default_auto_archive_duration¶
Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080
- Type
APINullable[
int
]
- guild_id¶
The id of the guild (may be missing for some channel objects received over gateway guild dispatches)
- Type
APINullable[
Snowflake
]
- last_message_id¶
The id of the last message sent in this channel (may not point to an existing or valid message)
- Type
APINullable[Optional[
Snowflake
]]
- last_pin_timestamp¶
When the last pinned message was pinned. This may be null in events such as GUILD_CREATE when a message is not pinned.
- Type
APINullable[Optional[
Timestamp
]]
- member¶
Thread member object for the current user, if they have joined the thread, only included on certain API endpoints
- Type
APINullable[
GuildMember
]
- parent_id¶
For guild channels: id of the parent category for a channel (each parent category can contain up to 50 channels), for threads: id of the text channel this thread was created
- Type
APINullable[Optional[
Snowflake
]]
- permissions¶
Computed permissions for the invoking user in the channel, including overwrites, only included when part of the resolved data received on a slash command interaction
- Type
APINullable[
str
]
- permission_overwrites¶
Explicit permission overwrites for members and roles
- Type
APINullable[List[
Overwrite
]]
- rate_limit_per_user¶
Amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission manage_messages or manage_channel, are unaffected
- Type
APINullable[
int
]
- rtc_region¶
Voice region id for the voice channel, automatic when set to null
- Type
APINullable[Optional[
str
]]
- thread_metadata¶
Thread-specific fields not needed by other channels
- Type
APINullable[
ThreadMetadata
]
- video_quality_mode¶
The camera video quality mode of the voice channel, 1 when not present
- Type
APINullable[
int
]
- await delete(reason=None, /, channel_id=None)¶
This function is a coroutine.
Delete the current channel.
:param reason Optional[
str
]: The reason of the channel delete. :param channel_idSnowflake
: The id of the channel, defaults to the current object id.
- await edit(reason=None, **kwargs)¶
Edit a channel with the given keyword arguments.
:param reason Optional[
str
]: The reason of the channel delete. :param **kwargs: The keyword arguments to edit the channel with.- Returns
The updated channel object.
- Return type
- classmethod await from_id(client, channel_id)¶
This function is a coroutine. Creates a channel object. You should use the
get_channel
method fromClient
most of the time. Theget_dm_channel
method fromUser
should be used if you need to create a dm_channel. Using thesend()
method fromUser
is preferred.
TextChannel¶
- asyncedit
- asyncfetch_message
- class TextChannel¶
Bases:
pincer.objects.guild.channel.Channel
A subclass of
Channel
for text channels with all the same attributes.- await edit(**kwargs)¶
Edit a text channel with the given keyword arguments.
- Parameters
**kwargs – The keyword arguments to edit the channel with.
- Returns
The updated channel object.
- Return type
VoiceChannel¶
- asyncedit
- class VoiceChannel¶
Bases:
pincer.objects.guild.channel.Channel
A subclass of
Channel
for voice channels with all the same attributes.
CategoryChannel¶
- class CategoryChannel¶
Bases:
pincer.objects.guild.channel.Channel
A subclass of
Channel
for categories channels with all the same attributes.
NewsChannel¶
- asyncedit
- class NewsChannel¶
Bases:
pincer.objects.guild.channel.Channel
A subclass of
Channel
for news channels with all the same attributes.
ChannelMention¶
- class ChannelMention¶
Bases:
pincer.utils.api_object.APIObject
Represents a Discord Channel Mention object
- type¶
The type of channel
- Type
Features¶
GuildFeature¶
- ANIMATED_ICON
- BANNER
- COMMERCE
- COMMUNITY
- DISCOVERABLE
- FEATURABLE
- INVITE_SPLASH
- MEMBER_VERIFICATION_GATE_ENABLED
- MONETIZATION_ENABLED
- MORE_STICKERS
- NEWS
- PARTNERED
- PREVIEW_ENABLED
- PRIVATE_THREADS
- SEVEN_DAY_THREAD_ARCHIVE
- THREE_DAY_THREAD_ARCHIVE
- TICKETED_EVENTS_ENABLED
- VANITY_URL
- VERIFIED
- VIP_REGIONS
- WELCOME_SCREEN_ENABLED
- class GuildFeature¶
Bases:
enum.Enum
Represents Guild Features strings.
- ANIMATED_ICON¶
Guild can have an animated icon.
- BANNER¶
Guild can have a banner.
- COMMERCE¶
Guild can have commerce.
- COMMUNITY¶
Guild is a community.
- DISCOVERABLE¶
Guild can be discovered.
- FEATURABLE¶
Guild can be featureurable.Guild can have an invite splash.
- INVITE_SPLASH¶
Guild can be featureurable.
- MEMBER_VERIFICATION_GATE_ENABLED¶
Guild has member verification enabled.
- NEWS¶
Guild has a news channel.
- PARTNERED¶
Guild is a partner.
- PREVIEW_ENABLED¶
Guild has preview enabled.
- VANITY_URL¶
Guild has a vanity url.
- VERIFIED¶
Guild is verified.
- VIP_REGIONS¶
Guild can have VIP regions.
- WELCOME_SCREEN_ENABLED¶
Guild has welcome screen enabled.
- TICKETED_EVENTS_ENABLED¶
Guild has ticketed events enabled.
- MONETIZATION_ENABLED¶
Guild has monetization enabled.
- MORE_STICKERS¶
Guild can have more stickers.
- THREE_DAY_THREAD_ARCHIVE¶
Guild can have three day archive time for threads.
- SEVEN_DAY_THREAD_ARCHIVE¶
Guild can have seven day archive time for threads.
- PRIVATE_THREADS¶
Guild can have private threads.
Followed Channel¶
FollowedChannel¶
Guild¶
GuildNSFWLevel¶
- class GuildNSFWLevel¶
Bases:
enum.IntEnum
Represents the NSFW level of a guild. .. attribute:: DEFAULT
Default NSFW level.
- EXPLICIT¶
Explicit NSFW level.
- SAFE¶
SAFE NSFW level.
- AGE_RESTRICTED¶
Age restricted NSFW level.
ExplicitContentFilterLevel¶
- class ExplicitContentFilterLevel¶
Bases:
enum.IntEnum
Represents the filter content level of a guild. .. attribute:: DISABLED
Media content will not be scanned.
- MEMBERS_WITHOUT_ROLES¶
Media content sent by members without roles will be scanned.
- ALL_MEMBERS¶
Media content sent by all members will be scanned.
MFALevel¶
- class MFALevel¶
Bases:
enum.IntEnum
Represents the multi factor authentication level of a guild. .. attribute:: NONE
Guild has no MFA/2FA requirement for moderation actions.
- ELEVATED¶
Guild has a 2FA requirement for moderation actions
VerificationLevel¶
- class VerificationLevel¶
Bases:
enum.IntEnum
Represents the verification level of a guild. .. attribute:: NONE
Unrestricted.
- LOW¶
Must have verified email on account.
- MEDIUM¶
Must be registered on Discord for longer than 5 minutes.
- HIGH¶
Must be a member of the server for longer than 10 minutes.
- VERY_HIGH¶
Must have a verified phone number.
DefaultMessageNotificationLevel¶
- class DefaultMessageNotificationLevel¶
Bases:
enum.IntEnum
Represents the default message notification level of a guild. .. attribute:: ALL_MESSAGES
Members will receive notifications for all messages by default.
- ONLY_MENTIONS¶
Members will receive notifications only for messages that @mention them by default.
SystemChannelFlags¶
- class SystemChannelFlags¶
Bases:
enum.IntEnum
Represents the system channel flags of a guild. .. attribute:: SUPPRESS_JOIN_NOTIFICATIONS
Suppress member join notifications.
- SUPPRESS_PREMIUM_SUBSCRIPTIONS¶
Suppress server boost notifications.
- SUPPRESS_GUILD_REMINDER_NOTIFICATIONS¶
Suppress server setup tips.
- SUPPRESS_JOIN_NOTIFICATION_REPLIES¶
Hide member join sticker reply buttons
Guild¶
- afk_timeout
- application_id
- approximate_member_count
- approximate_presence_count
- banner
- channels
- default_message_notifications
- description
- discovery_splash
- emojis
- explicit_content_filter
- features
- icon
- icon_hash
- id
- joined_at
- large
- max_members
- max_presences
- max_video_channel_users
- member_count
- members
- mfa_level
- name
- nsfw
- nsfw_level
- owner
- owner_id
- permissions
- preferred_locale
- premium_subscription_count
- premium_tier
- presences
- public_updates_channel_id
- region
- roles
- rules_channel_id
- splash
- stage_instances
- stickers
- system_channel_flags
- system_channel_id
- threads
- unavailable
- vanity_url_code
- verification_level
- voice_states
- welcome_screen
- widget_channel_id
- widget_enabled
- clsGuild.from_dict
- clsGuild.from_id
- asyncban
- asyncdelete
- asyncget_member
- asynckick
- asyncpreview
- class Guild¶
Bases:
pincer.utils.api_object.APIObject
Represents a Discord guild/server in which your client resides. .. attribute:: afk_channel_id
Id of afk channel
- type
Optional[
Snowflake
]
- default_message_notifications¶
Default message notifications level
- discovery_splash¶
Discovery splash hash; only present for guilds with the “DISCOVERABLE” feature
- Type
Optional[
str
]
- explicit_content_filter¶
Explicit content filter level
- features¶
Enabled guild features
- Type
List[
GuildFeature
]
- nsfw_level¶
Guild NSFW level
- Type
NSFWLevel
- preferred_locale¶
The preferred locale of a Community guild; used in server discovery and notices from Discord; defaults to “en-US”
- Type
Premium tier (Server Boost level)
- Type
- public_updates_channel_id¶
The id of the channel where admins and moderators of Community guilds receive notices from Discord
- Type
Optional[
Snowflake
]
- rules_channel_id¶
The id of the channel where Community guilds can display rules and/or guidelines
- Type
Optional[
Snowflake
]
- system_channel_flags¶
System channel flags
- Type
- system_channel_id¶
The id of the channel where guild notices such as welcome messages and boost events are posted
- Type
Optional[
Snowflake
]
- verification_level¶
Verification level required for the guild
- Type
- approximate_member_count¶
Approximate number of members in this guild, returned from the GET /guilds/<id> endpoint when with_counts is true
- Type
APINullable[
int
]
- approximate_presence_count¶
Approximate number of non-offline members in this guild, returned from the GET /guilds/<id> endpoint when with_counts is true
- Type
APINullable[
int
]
- max_presences¶
The maximum number of presences for the guild (null is always returned, apart from the largest of guilds)
- Type
APINullable[Optional[
int
]]
- members¶
Users in the guild
- Type
APINullable[List[
GuildMember
]]
- permissions¶
Total permissions for the user in the guild (excludes overwrites)
- Type
APINullable[
str
]
The number of boosts this guild currently has
- Type
APINullable[
int
]
- presences¶
Presences of the members in the guild, will only include non-offline members if the size is greater than large threshold
- Type
APINullable[List[
PresenceUpdateEvent
]]
- stage_instances¶
Stage instances in the guild
- Type
APINullable[List[
StageInstance
]]
- threads¶
All active threads in the guild that current user has permission to view
- Type
APINullable[List[
Channel
]]
True if this guild is unavailable due to an outage
- Type
APINullable[
bool
]
- voice_states¶
States of members currently in voice channels; lacks the guild_id key
- Type
APINullable[List[
VoiceState
]]
- widget_channel_id¶
The channel id that the widget will generate an invite to, or null if set to no invite
- Type
APINullable[Optional[
Snowflake
]]
- welcome_screen¶
The welcome screen of a Community guild, shown to new members, returned in an Invite’s guild object
- Type
APINullable[
WelcomeScreen
]
- await ban(member_id, reason=None, delete_message_days=None)¶
- classmethod from_dict(data)¶
- Parameters
data (
Dict
) – Guild data received from the discord API.- Returns
Guild
– The new guild object.Raises
UnavailableGuildError
– The guild is unavailable due to a discord outage.
- classmethod await from_id(client, _id)¶
- Parameters
client (~pincer.Client) – Client object to use the http gateway from.
_id – Guild ID.
- Returns
The new guild object.
- Return type
class: ~pincer.objects.guild.guild.Guild
- await get_member(_id)¶
This function is a coroutine. Fetches a GuildMember from its identifier :param _id: The id of the guild member which should be fetched from the Discord
gateway.
- Returns
A GuildMember object.
- Return type
Invite¶
InviteTargetType¶
- class InviteTargetType¶
Bases:
enum.IntEnum
Represents the type of the invite.
- STREAM¶
A normal Discord invite, eg for a channel or guild.
- EMBEDDED_APPLICATION¶
An embedded application invite, eg poker-night etc.
InviteStageInstance¶
- class InviteStageInstance¶
Bases:
pincer.utils.api_object.APIObject
Represents an invite for a Discord stages channel.
- members¶
the members speaking in the Stage
- Type
List[
GuildMember
]
InviteMetadata¶
- class InviteMetadata¶
Bases:
pincer.utils.api_object.APIObject
Extra information about an invite, will extend the invite object.
Invite¶
- class Invite¶
Bases:
pincer.utils.api_object.APIObject
Represents a Discord invite.
- approximate_member_count¶
Approximate count of total members, returned from the GET /invites/<code> endpoint when with_counts is true
- Type
APINullable[
int
]
- approximate_presence_count¶
Approximate count of online members, returned from the GET /invites/<code> endpoint when with_counts is true
- Type
APINullable[
int
]
- expires_at¶
The expiration date of this invite, returned from the GET /invites/<code> endpoint when with_expiration is true
- Type
APINullable[Optional[
Timestamp
]]
- stage_instance¶
Stage instance data if there is a public Stage instance in the Stage channel this invite is for
- Type
- target_type¶
The type of target for this voice channel invite
- Type
- target_application¶
The embedded application to open for this voice channel embedded application invite
- Type
Member¶
BaseMember¶
- class BaseMember¶
Bases:
pincer.utils.api_object.APIObject
Represents the base of a guild member.
PartialGuildMember¶
- class PartialGuildMember¶
Bases:
pincer.utils.api_object.APIObject
Represents a partial guild member. This is a reference to a member from a guild which does not contain all information.
This gets used in form example message mentions.
- member¶
The user their (partial) guild information.
- Type
GuildMember¶
- class GuildMember¶
Bases:
pincer.objects.guild.member.BaseMember
,pincer.utils.api_object.APIObject
Represents a member which resides in a guild/server.
- pending¶
Whether the user has not yet passed the guild’s Membership Screening requirements
- Type
APINullable[
bool
]
- permissions¶
Total permissions of the member in the channel, including overwrites, returned when in the interaction object
- Type
APINullable[
str
]
When the user started boosting the guild
- Type
APINullable[Optional[
Timestamp
]]
Overwrite¶
Overwrite¶
Role¶
Role¶
- class Role¶
Bases:
pincer.utils.api_object.APIObject
Represents a Discord guild/server role.
- color¶
Integer representation of hexadecimal color code
- Type
Color
Stage¶
PrivacyLevel¶
- class PrivacyLevel¶
Bases:
enum.IntEnum
Represents the level of publicity of a stage.
- PUBLIC¶
The stage is public.
- GUILD_ONLY¶
The stage of for guild members only.
StageInstance¶
- class StageInstance¶
Bases:
pincer.utils.api_object.APIObject
Represents a Stage Instance object
- privacy_level¶
Privacy level of the Stage instance
- Type
Template¶
GuildTemplate¶
- class GuildTemplate¶
Bases:
pincer.utils.api_object.APIObject
Represents a code that when used, creates a guild based on a snapshot of an existing guild.
Thread¶
ThreadMetadata¶
- class ThreadMetadata¶
Bases:
pincer.utils.api_object.APIObject
Represents a Discord Thread Metadata object
- auto_archive_duration¶
Duration in minutes to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080
- Type
- archive_timestamp¶
Timestamp when the thread’s archive status was last changed, used for calculating recent activity
- Type
- locked¶
Whether the thread is locked; when a thread is locked, only users with MANAGE_THREADS can unarchive it
- Type
ThreadMember¶
- class ThreadMember¶
Bases:
pincer.utils.api_object.APIObject
Represents a Discord Thread Member object
Webhook¶
WebhookType¶
- class WebhookType¶
Bases:
enum.IntEnum
Represents the type of a webhook.
- INCOMING¶
Incoming Webhooks can post messages to channels with a generated token.
- CHANNEL_FOLLOWER¶
Channel Follower Webhooks are internal webhooks used with Channel Following to post new messages into channels.
- APPLICATION¶
Application webhooks are webhooks used with Interactions
Webhook¶
- class Webhook¶
Bases:
pincer.utils.api_object.APIObject
Represents a Discord channel webhook.
- type¶
The type of the webhook
- Type
- user¶
The user this webhook was created by (not returned when getting a webhook with its token)
- Type
APINullable[
User
]
- source_guild¶
The guild of the channel that this webhook is following (returned for Channel Follower Webhooks)
- Type
APINullable[
Guild
]
- source_channel¶
The channel that this webhook is following (returned for Channel Follower Webhooks)
- Type
APINullable[
Channel
]
Welcome Screen¶
WelcomeScreenChannel¶
- class WelcomeScreenChannel¶
Bases:
pincer.utils.api_object.APIObject
Represents a welcome screen channel. This is a channel which gets shown on the welcome screen.
WelcomeScreen¶
- class WelcomeScreen¶
Bases:
pincer.utils.api_object.APIObject
Representation of a Discord guild/server welcome screen.
- description¶
The server description shown in the welcome screen
- Type
LIst[
WelcomeScreenChannel
]