Guilds

Manager

class GuildManager(client: HTTPClient, cache: CacheStorage)

Bases: BaseManager

Manager used to fetch Guild objects.

get(guild_id: int) Guild | None

Attempts to fetch a Guild from the internal cache of the bot.

Parameters:

guild_id (int) – The guild_id of the guild to fetch.

Returns:

  • Guild – The Guild received from the cache.

  • None – Could not find the Guild object in the internal cache.

async fetch(guild_id: int) Guild

Attempts to fetch a Guild from the Discord API.

Parameters:

guild_id (int) – The guild_id of the guild to fetch.

Returns:

The Message object recieved from Discord API.

Return type:

Guild

Raises:
async get_or_fetch(guild_id: int) Guild

A couroutine function that attempts to fetch a Guild from internal cache and if not present, makes an API call to discord.

Parameters:

guild_id (int) – The guild_id of the guild to fetch.

Returns:

The Message object recieved from Discord API.

Return type:

Guild

Raises:

Guilds

class UnavailableGuild(data: UnavailableGuildPayload)

Bases: object

id
unavailable
class GuildScheduledEvent(data: GuildScheduledEventPayload)

Bases: object

id
guild_id
channel_id
creator_id
name
description
scheduled_start_time
scheduled_end_time
privacy_level
status
entity_type
entity_id
entity_metadata
creator
user_count
image
recurrence_rule
class Guild(data: GuildPayload)

Bases: object

id
name
icon
splash
discovery_splash
owner_id
afk_channel_id
afk_timeout
verification_level
default_message_notifications
explicit_level
roles
emojis
features
mfa_level
application_id
system_channel_id
system_channel_flags
rules_channel_id
max_presences
max_members
vanity_url_code
description
banner
premium_tier
premium_subscription_count: int
preferred_locale
public_updates_channel_id
max_video_channel_users
max_stage_video_channel_users
approximate_member_count
approximate_presence_count
nsfw_level
stickers
premium_progress_bar_enabled
safety_alerts_channel_id
joined_at
large
member_count
members
channels
threads
presences
stage_instances
guild_scheduled_events
property created_at: datetime
voice_states
soundboard_sounds

Emojis

class ActivityEmoji(data: ActivityEmojiPayload)

Bases: object

id
name
animated
class PartialEmoji(data: PartialEmojiPayload)

Bases: object

id
animated
name
asset
property created_at: datetime | None
class Emoji(data: EmojiPayload)

Bases: object

id
name
roles
user
require_colons
managed
animated
available
asset
class DefaultReaction(data: DefaultReactionPayload)

Bases: object

emoji_id
emoji_name
class Reaction(data: ReactionPayload)

Bases: object

count
count_detail
me
me_burst
emoji
burst_colors
class ReactionCountDetail(data: ReactionCountDetailPayload)

Bases: object

burst
normal

Roles

class Role(data: RolePayload)

Bases: object

property created_at: datetime

Stickers

class PartialSticker(data: PartialStickerPayload)

Bases: object

id
name
format_type
class Sticker(data: StickerPayload)

Bases: PartialSticker

pack_id
description
tags
type
available
guild_id
user
sort_value
asset
property created_at: datetime
format_type
id
name

Guild Enums

class GuildVerificationLevel(*values)
NONE = 0
LOW = 1
MEDIUM = 2
HIGH = 3
VERY_HIGH = 4
class GuildNotificationLevel(*values)
ALL_MESSAGES = 0
ONLY_MENTIONS = 1
class GuildExplicitContentLevel(*values)
DISABLED = 0
MEMBER_WITHOUT_ROLES = 1
ALL_MEMBERS = 2
class GuildMFALevel(*values)
NONE = 0
ELEVATED = 1
class GuildPremiumTier(*values)
NONE = 0
TIER_1 = 1
TIER_2 = 2
TIER_3 = 3
class GuildNSFWLevel(*values)
DEFAULT = 0
EXPLICIT = 1
SAFE = 2
AGE_RESTRICTED = 3
class GuildFeature(*values)
ANIMATED_BANNER = 'ANIMATED_BANNER'
ANIMATED_ICON = 'ANIMATED_ICON'
APPLICATION_COMMAND_PERMISSIONS_V2 = 'APPLICATION_COMMAND_PERMISSIONS_V2'
AUTO_MODERATION = 'AUTO_MODERATION'
BANNER = 'BANNER'
COMMUNITY = 'COMMUNITY'
CREATOR_MONETIZABLE_PROVISIONAL = 'CREATOR_MONETIZABLE_PROVISIONAL'
CREATOR_STORE_PAGE = 'CREATOR_STORE_PAGE'
DEVELOPER_SUPPORT_SERVER = 'DEVELOPER_SUPPORT_SERVER'
DISCOVERABLE = 'DISCOVERABLE'
FEATURABLE = 'FEATURABLE'
INVITES_DISABLED = 'INVITES_DISABLED'
INVITE_SPLASH = 'INVITE_SPLASH'
MEMBER_VERIFICATION_GATE_ENABLED = 'MEMBER_VERIFICATION_GATE_ENABLED'
MORE_SOUNDBOARD = 'MORE_SOUNDBOARD'
MORE_STICKERS = 'MORE_STICKERS'
NEWS = 'NEWS'
PARTNERED = 'PARTNERED'
PREVIEW_ENABLED = 'PREVIEW_ENABLED'
RAID_ALERTS_DISABLED = 'RAID_ALERTS_DISABLED'
ROLE_ICONS = 'ROLE_ICONS'
ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE = 'ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE'
ROLE_SUBSCRIPTIONS_ENABLED = 'ROLE_SUBSCRIPTIONS_ENABLED'
SOUNDBOARD = 'SOUNDBOARD'
TICKETED_EVENTS_ENABLED = 'TICKETED_EVENTS_ENABLED'
VANITY_URL = 'VANITY_URL'
VERIFIED = 'VERIFIED'
VIP_REGIONS = 'VIP_REGIONS'
WELCOME_SCREEN_ENABLED = 'WELCOME_SCREEN_ENABLED'
GUESTS_ENABLED = 'GUESTS_ENABLED'
GUILD_TAGS = 'GUILD_TAGS'
ENHANCED_ROLE_COLORS = 'ENHANCED_ROLE_COLORS'
class GuildScheduledEventStatus(*values)
SCHEDULED = 1
ACTIVE = 2
COMPLETED = 3
CANCELED = 4
class GuildScheduledEventEntityType(*values)
STAGE_INSTANCE = 1
VOICE = 2
EXTERNAL = 3
class EventRecurrenceRuleFrequency(*values)
YEARLY = 0
MONTHLY = 1
WEEKLY = 2
DAILY = 3
class EventRecurrenceRuleMonth(*values)
JANUARY = 1
FEBRUARY = 2
MARCH = 3
APRIL = 4
MAY = 5
JUNE = 6
JULY = 7
AUGUST = 8
SEPTEMBER = 9
OCTOBER = 10
NOVEMBER = 11
DECEMBER = 12
class EventRecurrenceRuleWeekday(*values)
MONDAY = 0
TUESDAY = 1
WEDNESDAY = 2
THURSDAY = 3
FRIDAY = 4
SATURDAY = 5
SUNDAY = 6

Sticker Enums

class StickerType(*values)
STICKER = 1
GUILD = 2
class StickerFormatType(*values)
PNG = 1
APNG = 2
LOTTIE = 3
GIF = 4