Pincer Objects Guild Section

Audit Log

AuditLogEvent

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

Attributes
class AuditLogChange

Bases: pincer.utils.api_object.APIObject

Representation of Discord Audit Log Change object

new_value

New value of the key

Type

Any

old_value

Old value of the key

Type

Any

key

Name of audit log change key

Type

str

AuditEntryInfo

class AuditEntryInfo

Bases: pincer.utils.api_object.APIObject

Represents Discord Optional Audit Entry Info

delete_member_days

Number of days after which inactive members were kicked

Type

str

members_removed

Number of members removed by the prune

Type

str

channel_id

Channel in which the entities were targeted

Type

Snowflake

message_id

Id of the message that was targeted

Type

Snowflake

count

Number of entities that were targeted

Type

str

id

Id of the overwritten entity

Type

Snowflake

type

Type of overwritten entity - “0” for “role” or “1” for “member”

Type

str

role_name

Name of the role if type is “0” (not present if type is “1”)

Type

str

AuditLogEntry

class AuditLogEntry

Bases: pincer.utils.api_object.APIObject

Represents a Discord Audit Log Entry object.

target_id

Id of the affected entity x(webhook, user, role, etc.)

Type

Optional[str]

user_id

The user who made the changes

Type

Snowflake

id

Id of the entry

Type

Snowflake

action_type

Type of action that occurred

Type

AuditLogEvent

changes

Changes made to the target_id

Type

APINullable[List[AuditLogChange]]

options

Additional info for certain action types

Type

APINullable[List[AuditLogChange]]

reason

The reason for the change x(0-512 characters)

Type

APINullable[str]

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

Ban

Ban

Attributes
class Ban

Bases: pincer.utils.api_object.APIObject

Representation of the Discord Ban object

reason

The reason for the ban

Type

Optional[str]

user

The banned user

Type

User

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

class Channel

Bases: pincer.utils.api_object.APIObject

Represents a Discord Channel Mention object

id

The id of this channel

Type

Snowflake

type

The type of channel

Type

ChannelType

application_id

Application id of the group DM creator if it is bot-created

Type

APINullable[Snowflake]

bitrate

The bitrate (in bits) of the voice channel

Type

APINullable[int]

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]

icon

Icon hash

Type

APINullable[Optional[str]]

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]

member_count

An approximate count of users in a thread, stops counting at 50

Type

APINullable[int]

message_count

An approximate count of messages in a thread, stops counting at 50

Type

int

name

The name of the channel (1-100 characters)

Type

APINullable[str]

nsfw

Whether the channel is nsfw

Type

APINullable[bool]

owner_id

Id of the creator of the group DM or thread

Type

APINullable[Snowflake]

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]]

position

Sorting position of the channel

Type

APINullable[int]

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]

recipients

The recipients of the DM

Type

APINullable[List[User]]

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]

topic

The channel topic (0-1024 characters)

Type

APINullable[Optional[str]]

user_limit

The user limit of the voice channel

Type

APINullable[int]

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_id Snowflake: 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

Channel

classmethod await from_id(client, channel_id)

This function is a coroutine. Creates a channel object. You should use the get_channel method from Client most of the time. The get_dm_channel method from User should be used if you need to create a dm_channel. Using the send() method from User is preferred.

Parameters
  • client (Client) – Client object to use the HTTP class of.

  • channel_id (int) – ID of the channel you want.

Returns

The channel object.

Return type

Channel

await send(message)

This function is a coroutine.

Send a message in the channel.

:param message Message: The message which must be sent

Returns

The message that was sent.

Return type

UserMessage

TextChannel

Methods
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

Channel

await fetch_message(message_id)

This function is a coroutine. Returns a UserMessage from this channel with the given id.

Parameters

message_id – The message ID to look for.

Returns

The requested message.

Return type

UserMessage

VoiceChannel

Methods
class VoiceChannel

Bases: pincer.objects.guild.channel.Channel

A subclass of Channel for voice 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

Channel

CategoryChannel

class CategoryChannel

Bases: pincer.objects.guild.channel.Channel

A subclass of Channel for categories channels with all the same attributes.

NewsChannel

Methods
class NewsChannel

Bases: pincer.objects.guild.channel.Channel

A subclass of Channel for news 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

Channel

ChannelMention

Attributes
class ChannelMention

Bases: pincer.utils.api_object.APIObject

Represents a Discord Channel Mention object

id

Id of the channel

Type

Snowflake

guild_id

Id of the guild containing the channel

Type

Snowflake

type

The type of channel

Type

ChannelType

name

The name of the channel

Type

str

Features

GuildFeature

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

Attributes
class FollowedChannel

Bases: pincer.utils.api_object.APIObject

Represents a Discord Followed Channel object

channel_id

Source channel id

Type

Snowflake

webhook_id

Created target webhook id

Type

Snowflake

Guild

PremiumTier

Attributes
class PremiumTier

Bases: enum.IntEnum

Represents the boost tier of a guild. .. attribute:: NONE

Guild has not unlocked any Server Boost perks.

TIER_1

Guild has unlocked Server Boost level 1 perks.

TIER_2

Guild has unlocked Server Boost level 2 perks.

TIER_3

Guild has unlocked Server Boost level 3 perks.

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

Attributes
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

Attributes
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

Attributes
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

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]

afk_timeout

Afk timeout in seconds

Type

int

application_id

Application id of the guild creator if it is bot-created

Type

Optional[Snowflake]

banner

Banner hash

Type

Optional[str]

default_message_notifications

Default message notifications level

Type

DefaultMessageNotificationLevel

description

The description of a Community guild

Type

Optional[str]

discovery_splash

Discovery splash hash; only present for guilds with the “DISCOVERABLE” feature

Type

Optional[str]

emojis

Custom guild emojis

Type

List[Emoji]

explicit_content_filter

Explicit content filter level

Type

ExplicitContentFilterLevel

features

Enabled guild features

Type

List[GuildFeature]

id

Guild id

Type

Snowflake

icon

Icon hash

Type

Optional[str]

mfa_level

Required MFA level for the guild

Type

MFALevel

name

Guild name (2-100 characters, excluding trailing and leading whitespace)

Type

str

nsfw_level

Guild NSFW level

Type

NSFWLevel

owner_id

Id of owner

Type

Snowflake

preferred_locale

The preferred locale of a Community guild; used in server discovery and notices from Discord; defaults to “en-US”

Type

str

premium_tier

Premium tier (Server Boost level)

Type

PremiumTier

public_updates_channel_id

The id of the channel where admins and moderators of Community guilds receive notices from Discord

Type

Optional[Snowflake]

roles

Roles in the guild

Type

List[Role]

rules_channel_id

The id of the channel where Community guilds can display rules and/or guidelines

Type

Optional[Snowflake]

splash

Splash hash

Type

Optional[str]

system_channel_flags

System channel flags

Type

SystemChannelFlags

system_channel_id

The id of the channel where guild notices such as welcome messages and boost events are posted

Type

Optional[Snowflake]

vanity_url_code

The vanity url code for the guild

Type

Optional[str]

verification_level

Verification level required for the guild

Type

VerificationLevel

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]

channels

Channels in the guild

Type

APINullable[List[Channel]]

icon_hash

Icon hash, returned when in the template object

Type

APINullable[Optional[str]]

joined_at

When this guild was joined at

Type

APINullable[Timestamp]

large

True if this is considered a large guild

Type

APINullable[bool]

max_members

The maximum number of members for the guild

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]]

max_video_channel_users

The maximum amount of users in a video channel

Type

APINullable[int]

members

Users in the guild

Type

APINullable[List[GuildMember]]

member_count

Total number of members in this guild

Type

APINullable[bool]

nsfw

Boolean if the server is NSFW

Type

APINullable[bool]

owner

True if the user is the owner of the guild

Type

APINullable[bool]

permissions

Total permissions for the user in the guild (excludes overwrites)

Type

APINullable[str]

premium_subscription_count

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]]

stickers

Custom guild stickers

Type

Optional[List[Sticker]]

region

Voice region id for the guild (deprecated)

Type

APINullable[Optional[str]]

threads

All active threads in the guild that current user has permission to view

Type

APINullable[List[Channel]]

unavailable

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_enabled

True if the server widget is enabled

Type

APINullable[bool]

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)
Parameters
  • member_id (int) – ID of the guild member to ban.

  • reason (Optional[str]) – Reason for the kick.

  • delete_message_days (Optional[int]) – Number of days to delete messages for (0-7)

await delete()

This function is a coroutine. Deletes the guild. Returns 204 No Content on success.

classmethod from_dict(data)
Parameters

data (Dict) – Guild data received from the discord API.

Returns

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

GuildMember

await kick(member_id, reason=None)

This function is a coroutine. Kicks a guild member. :param member_id: ID of the guild member to kick. :type member_id: int :param reason: Reason for the kick. :type reason: Optional[str]

await preview()

This function is a coroutine. Previews the guild. :returns: The guild preview object. :rtype: GuildPreview

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]

participant_count

the number of users in the Stage

Type

int

speaker_count

the number of users speaking in the Stage

Type

int

topic

the topic of the Stage instance (1-120 characters)

Type

str

InviteMetadata

class InviteMetadata

Bases: pincer.utils.api_object.APIObject

Extra information about an invite, will extend the invite object.

uses

number of times this invite has been used

Type

int

max_uses

Max number of times this invite can be used

Type

int

max_age

Duration (in seconds) after which the invite expires

Type

int

temporary

Whether this invite only grants temporary membership

Type

bool

created_at

When this invite was created

Type

Timestamp

Invite

class Invite

Bases: pincer.utils.api_object.APIObject

Represents a Discord invite.

channel

The channel this invite is for

Type

Channel

code

The invite code (unique ID)

Type

str

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]]

inviter

The user who created the invite

Type

APINullable[User]

guild

The guild this invite is for

Type

Guild

stage_instance

Stage instance data if there is a public Stage instance in the Stage channel this invite is for

Type

InviteStageInstance

target_type

The type of target for this voice channel invite

Type

InviteTargetType

target_user

The user whose stream to display for this voice channel stream invite

Type

User

target_application

The embedded application to open for this voice channel embedded application invite

Type

Application

Member

BaseMember

class BaseMember

Bases: pincer.utils.api_object.APIObject

Represents the base of a guild member.

deaf

Whether the user is deafened in voice channels

Type

bool

joined_at

Then the user joined the guild

Type

Timestamp

mute

Whether the user is muted in voice channels

Type

bool

roles

Array of role object ids

Type

List[Snowflake]

hoisted_role

The user’s top role in the guild.

Type

APINullable[Snowflake]

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.

id

The user’s id

Type

Snowflake

username

The user’s username, not unique across the platform

Type

str

discriminator

The user’s 4-digit discord-tag

Type

str

avatar

The user’s avatar hash

Type

str

public_flags

The flags on a user’s account

Type

int

member

The user their (partial) guild information.

Type

BaseMember

GuildMember

class GuildMember

Bases: pincer.objects.guild.member.BaseMember, pincer.utils.api_object.APIObject

Represents a member which resides in a guild/server.

nick

This users guild nickname

Type

APINullable[Optional[str]]

pending

Whether the user has not yet passed the guild’s Membership Screening requirements

Type

APINullable[bool]

is_pending

Deprecated version of pending.

Type

APINullable[bool]

permissions

Total permissions of the member in the channel, including overwrites, returned when in the interaction object

Type

APINullable[str]

premium_since

When the user started boosting the guild

Type

APINullable[Optional[Timestamp]]

user

The user this guild member represents

Type

APINullable[User]

Avatar

The user’s avatar.

Type

APINullable[str]

Overwrite

Overwrite

Attributes
class Overwrite

Bases: pincer.utils.api_object.APIObject

Represents a Discord Overwrite object

id

Role or user id

Type

Snowflake

type

Either 0 (role) or 1 (member)

Type

int

allow

Permission bit set

Type

str

deny

Permission bit set

Type

str

Role

RoleTags

class RoleTags

Bases: pincer.utils.api_object.APIObject

Special tags/flags which have been defined for a role.

bot_id

The id of the bot this role belongs to. (the role got created by adding the bot with this id)

Type

APINullable[Snowflake]

integration_id

The id of the integration this role belongs to. (the role got created by adding an integration with this id)

Type

APINullable[Snowflake]

premium_subscriber

Whether this is the guild’s premium subscriber role or not.

Type

APINullable[bool]

Role

class Role

Bases: pincer.utils.api_object.APIObject

Represents a Discord guild/server role.

color

Integer representation of hexadecimal color code

Type

Color

hoist

If this role is pinned in the user listing

Type

bool

id

Role id

Type

Snowflake

managed

Whether this role is managed by an integration

Type

bool

mentionable

Whether this role is mentionable

Type

bool

name

Role name

Type

str

permissions

Permission bit set

Type

str

position

Position of this role

Type

int

icon

The role’s icon

Type

APINullable[str]

unicode_emoji

The unicode emoji for this role

Type

APINullable[str]

tags

The tags this role has

Type

RoleTags

property mention

Returns the mention string for this role.

Type

str

Stage

PrivacyLevel

Attributes
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

id

Id of this Stage instance

Type

Snowflake

guild_id

Guild id of the associated Stage channel

Type

Snowflake

channel_id

Id of the associated Stage channel

Type

Snowflake

topic

Topic of the Stage instance (1-120 characters)

Type

str

privacy_level

Privacy level of the Stage instance

Type

PrivacyLevel

discoverable

Is Stage Discovery enabled

Type

bool

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.

code

the template code (unique ID)

Type

str

name

template name

Type

str

description

the description for the template

Type

Optional[str]

usage_count

number of times this template has been used

Type

int

creator_id

the ID of the user who created the template

Type

Snowflake

creator

user who created the template

Type

User

created_at

when this template was created

Type

Timestamp

updated_at

when this template was last synced to the source guild

Type

Timestamp

source_guild_id

the ID of the guild this template is based on

Type

Snowflake

serialized_source_guild

the guild snapshot this template contains

Type

Guild

is_dirty

whether the template has unsynced changes

Type

Optional[bool]

Thread

ThreadMetadata

class ThreadMetadata

Bases: pincer.utils.api_object.APIObject

Represents a Discord Thread Metadata object

archived

Whether the thread is archived

Type

bool

auto_archive_duration

Duration in minutes to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080

Type

int

archive_timestamp

Timestamp when the thread’s archive status was last changed, used for calculating recent activity

Type

Timestamp

locked

Whether the thread is locked; when a thread is locked, only users with MANAGE_THREADS can unarchive it

Type

bool

invitable

Whether non-moderators can add other non-moderators to a thread; only available on private threads

Type

APINullable[bool]

ThreadMember

class ThreadMember

Bases: pincer.utils.api_object.APIObject

Represents a Discord Thread Member object

join_timestamp

The time the current user last joined the thread

Type

Timestamp

flags

Any user-thread settings, currently only used for notifications

Type

int

id

Id of the thread

Type

APINullable[Snowflake]

user_id

Id of the user

Type

APINullable[Snowflake]

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.

id

The id of the webhook

Type

Snowflake

type

The type of the webhook

Type

WebhookType

channel_id

The channel id this webhook is for, if any

Type

Optional[Snowflake]

name

The default name of the webhook

Type

Optional[str]

avatar

The default user avatar hash of the webhook

Type

Optional[str]

application_id

The bot/OAuth2 application that created this webhook

Type

Optional[Snowflake]

user

The user this webhook was created by (not returned when getting a webhook with its token)

Type

APINullable[User]

token

The secure token of the webhook (returned for Incoming Webhooks)

Type

APINullable[str]

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]

url

The url used for executing the webhook (returned by the webhooks OAuth2 flow)

Type

APINullable[str]

guild_id

The guild id this webhook is for, if any

Type

APINullable[Optional[Guild]]

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.

channel_id

The channel’s id

Type

Snowflake

description

The description shown for the channel

Type

str

emoji_id

The emoji id, if the emoji is custom

Type

Optional[int]

emoji_name

The emoji name if custom, the unicode character if standard, or null if no emoji is set

Type

Optional[str]

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]

welcome_channels

The channels shown in the welcome screen, up to 5

Type

Optional[str]

Widget

GuildWidget

Attributes
class GuildWidget

Bases: pincer.utils.api_object.APIObject

Represents a Discord Guild Widget object

enabled

Whether the widget is enabled

Type

bool

channel_id

The widget channel id

Type

Optional[Snowflake]