Models¶
Our models use the Pydantic module for simple data parsing.
All methods from BaseModel are inherited along with ours.
These methods will not be shown in our docs, you can find them in the Pydantic documentation.
Snowflake¶
A snowflake is a representation of a discord ID, which is a unique integer.
When working with a class type hinted with Snowflake,
its exactly the same as working with a int.
Emoji¶
- asyncdelete
- asyncedit
- defis_useable
- class acord.Emoji(*, conn: Any = None, id: acord.models.Snowflake, name: str, roles: List[acord.models.roles.Role] = [], user: acord.models.user.User = None, require_colons: bool = None, managed: bool = None, animated: bool = None, available: bool = None, is_unicode: bool = None, guild_id: int = None, deleted: bool = False, created_at: datetime.datetime = None)¶
Reprentation of a discord Emoji
- async delete(*, reason: Optional[str] = None, guild_id: Optional[int]) None¶
This function is a coroutine.
Deletes emoji
- edit(*, name: Optional[str] = None, roles: Optional[List[acord.models.roles.Role]] = None, reason: Optional[str] = None) acord.models.emoji.Emoji¶
This function is a coroutine.
Edits emoji
- is_useable()¶
Checks whether the client is able to use this emoji
- created_at: Optional[datetime.datetime]¶
When the emoji was created
- id: acord.models.Snowflake¶
ID of Emoji
- roles: Optional[List[acord.models.roles.Role]]¶
List of roles
- user: Optional[acord.models.user.User]¶
User who created the emoji
Guild¶
- afk_channel_id
- afk_timeout
- application_id
- banner
- channels
- created_at
- default_message_notifications
- description
- emojis
- explicit_content_filter
- features
- guild_scheduled_events
- icon
- id
- joined_at
- large
- max_members
- max_video_channel_users
- member_count
- members
- mfa_level
- name
- nsfw
- nsfw_level
- owner_id
- preferred_locale
- premium_progress_bar_enabled
- premium_subscription_count
- premium_tier
- presences
- public_updates_channel_id
- roles
- rules_channel_id
- splash
- stage_instances
- stickers
- system_channel_flags
- system_channel_id
- threads
- unavailable
- vanity_url_code
- verification_level
- voice_states
- clsGuild.create
- clsGuild.create_from_template
- asyncadd_member
- asynccreate_channel
- asynccreate_emoji
- asynccreate_event
- asynccreate_role
- asynccreate_sticker
- asynccreate_template
- asyncdelete
- asyncedit_welcome_screen
- asyncedit_widget
- asyncfetch_active_threads
- asyncfetch_audit_logs
- asyncfetch_ban
- asyncfetch_bans
- asyncfetch_channels
- asyncfetch_emoji
- asyncfetch_emojis
- asyncfetch_event
- asyncfetch_events
- asyncfetch_guild_widget_image
- asyncfetch_integrations
- asyncfetch_member
- asyncfetch_members
- asyncfetch_members_by_name
- asyncfetch_prune_count
- asyncfetch_regions
- asyncfetch_roles
- asyncfetch_sticker
- asyncfetch_stickers
- asyncfetch_template
- asyncfetch_templates
- asyncfetch_vanity_invite
- asyncfetch_webhooks
- asyncfetch_welcome_screen
- asyncfetch_widget
- asyncfetch_widget_settings
- defget_channel
- defget_member
- asyncmove_roles
- asyncprune
- asyncunban
- class acord.Guild(*, conn: Any = None, id: acord.models.Snowflake, name: str, icon: str = None, afk_channel_id: acord.models.Snowflake = None, afk_timeout: int = None, application_command_count: int = None, application_command_counts: Dict[str, int] = None, application_id: acord.models.Snowflake = None, banner: str = None, channels: Dict[acord.models.Snowflake, acord.models.channels.base.Channel], default_message_notifications: acord.bases.enums.guild.GuildMessageNotification, description: str = None, discovery_splash: str = None, embedded_activities: List[Any], emojis: Dict[acord.models.Snowflake, acord.models.emoji.Emoji], explicit_content_filter: acord.bases.enums.guild.ExplicitContentFilterLevel, features: List[str], guild_hashes: Dict[Any, Any], guild_scheduled_events: List[Dict[str, Any]], hub_type: bool = None, joined_at: datetime.datetime, large: bool, lazy: bool = None, max_members: int, max_video_channel_users: int = None, member_count: int, members: Dict[acord.models.Snowflake, acord.models.member.Member], mfa_level: acord.bases.enums.guild.MFALevel, nsfw: bool, nsfw_level: acord.bases.enums.guild.NSFWLevel, owner_id: acord.models.Snowflake, preferred_locale: str, premium_progress_bar_enabled: bool = None, premium_subscription_count: int, premium_tier: acord.bases.enums.guild.PremiumTierLevel, presences: List[Dict[str, Any]] = None, public_updates_channel_id: acord.models.Snowflake = None, roles: Dict[acord.models.Snowflake, acord.models.roles.Role], rules_channel_id: acord.models.Snowflake = None, splash: str = None, stage_instances: List[Any] = [], stickers: Dict[acord.models.Snowflake, acord.models.sticker.Sticker] = {}, system_channel_flags: int = None, system_channel_id: acord.models.Snowflake = None, threads: Dict[acord.models.Snowflake, acord.models.channels.thread.Thread] = {}, unavailable: bool = None, vanity_url_code: str = None, verification_level: acord.bases.enums.guild.VerificationLevel, voice_states: List[Any] = [], created_at: datetime.datetime = None)¶
Respresentation of a discord guild
Note
When working with the guild object,
Guild.largemay be useful to prevent grabbing members which exist but are not cached. This is only applicable when this value isTrue.- add_member(user_id: Union[acord.models.user.User, acord.models.Snowflake], access_token: str, *, nick: str = None, roles: List[Union[acord.models.roles.Role, acord.models.Snowflake]] = None, mute: bool = None, deaf: bool = None, reason: str = None) Optional[acord.models.member.Member]¶
This function is a coroutine.
For bots with an
access_tokenfor aUser, you may use this method for adding the user to this guild.Note
Requires
guilds.joinscope inorder to add the user- Parameters
user_id (Union[
User,Snowflake]) – User to add to guildaccess_token (
str) – Access token to be usednick (
str) – Nickname for userroles (List[Union[
Role,Snowflake]]) – List of roles to give user on joinmute (
bool) – Whether the user is muted in voice channelsdead (
bool) – Whether the user is deafened in voice channelsreason (
str) – Reason for adding member to guild
- async classmethod create(client, **data) Optional[acord.models.guild.Guild]¶
This function is a coroutine.
Creates a new guild, were the client is the owner.
Warning
Can only be used for bots in less then 10 guilds
- Parameters
client (
Client) – client being used to create guildname (
str) – name of the guild (2-100 characters)icon (
File) – image for the guild iconverification_level (
VerificationLevel) – verification level for guilddefault_message_notifications (
GuildMessageNotification) – default message notif for guildexplicit_content_filter (
ExplicitContentFilterLevel) – explicit content filter for guildroles (List[
Role]) – list of roles for guildchannels (List[
PartialChannel]) – list of partial channels for guildafk_channel_id (
Snowflake) – id for afk channelafk_timeout (
int) – afk timeout in secondssystem_channel_id (
Snowflake) – the id of the channel where guild notices such as welcome messages and boost events are postedsystem_channel_flags (
SystemChannelFlags) – guild system channel flags
- async create_channel(*, reason: Optional[str] = None, **data) acord.models.channels.base.Channel¶
This function is a coroutine.
Creates a new channel in the guild
- Parameters
name (
str) – Name of channeltype (
ChannelTypes) – Type of channel to createtopic (
str) – Channel topicbitrate (
int) – Bitrate for channel, VOICE ONLYuser_limit (
int) – User limit for channel, VOICE ONLYrate_limit_per_user (
int) – Slowmode for channelposition (
integer) – Sorting position of channelpermission_overwrite (List[
PermissionsOverwrite]) – channel permission overwritesparent_id (
Snowflake) – id of the parent category for channelnsfw (
bool) – Whether to mark channel as NSFWreason (
str) – Reason for creating channel
- async create_emoji(*, reason: Optional[str] = None, **data) acord.models.emoji.Emoji¶
This function is a coroutine.
Creates new guild emoji
- async create_event(*, reason: Optional[str] = None, **data) acord.models.guild_sched_event.GuildScheduledEvent¶
This function is a coroutine.
Creates a new guild scheduled event
- Parameters
reason (
str) – reason for creating evententity_type (
ScheduledEventEntityType) – the entity type of the scheduled eventname (
str) – name of the eventchannel_id (
Snowflake) – the channel id of the scheduled event.entity_metadata (
ScheduledEventMetaData) – the entity metadata of the scheduled eventprivacy_level (
ScheduledEventPrivacyLevel) – the privacy level of the scheduled eventscheduled_start_time (
datetime.datetime) – the start time of the scheduled eventscheduled_end_time (
datetime.datetime) – the end time of the scheduled eventdescription (
str) – the description of the scheduled event
- async classmethod create_from_template(client, code: str, **data) acord.models.guild.Guild¶
This function is a coroutine.
Creates a guild from a template
Warning
Can only be used for bots in less then 10 guilds
- async create_role(*, reason: Optional[str] = None, **data) acord.models.roles.Role¶
This function is a coroutine.
Creates a new role in the guild
- Parameters
name (
str) – Name of new role, if not provided sets tonew rolepermissions (
Permissions) – Role permissionscolor (
Color) – Colour of role, for reference checkoutEmbed.colorhoist (
bool) – Whether to dispay role seperatleyicon (
File) – the role’s icon imageunicode_emoji (
str) – the role’s icon as a unicode emojimentionable (
bool) – whether the role can be mentionedreason (
str) – reason for creating role
- async create_sticker(*, reason: Optional[str] = None, **data) acord.models.sticker.Sticker¶
This function is a coroutine.
Creates a new guild sticker
- async create_template(**data) acord.models.guild_template.GuildTemplate¶
This function is a coroutine.
Create new guild template
- async delete() None¶
This function is a coroutine.
Deletes this guild permanently, client must be owner
- edit_welcome_screen(*, enabled: bool, welcome_channels: List[acord.models.guild.WelcomeChannel], description: str, reason: str) acord.models.guild.WelcomeScreen¶
This function is a coroutine.
Modifies guild welcome screen
- async edit_widget(*, reason: Optional[str] = None, **data) acord.models.guild.GuildWidget¶
This function is a coroutine.
Edits guild widget
- Parameters
enabled (
bool) – whether the widget is enabledchannel_id (
Snowflake) – the widget channel id
- async fetch_active_threads(*, include_private: bool = True) Iterator[acord.models.channels.thread.Thread]¶
This function is a coroutine.
Fetches all active threads in guild
- Parameters
include_private (
bool) – Whether to include private threads when yielding
- async fetch_audit_logs(*, user_id: Optional[acord.models.Snowflake] = None, action_type: Optional[acord.bases.enums.audit_logs.AuditLogEvent] = None, before: Optional[acord.models.Snowflake] = None, limit: int = 50) acord.models.audit_logs.AuditLog¶
This function is a coroutine.
Fetches guilds audit log
- Parameters
user_id (
Snowflake) – Filter actions for only this useraction_type (
AuditLogEvent) – the type of audit log eventbefore (
Snowflake) – filter the log before a certain entry idlimit (
int) – how many entries are returned (default 50, minimum 1, maximum 100)
- async fetch_ban(user_id: Union[acord.models.user.User, acord.models.Snowflake]) Optional[acord.models.guild.Ban]¶
This function is a coroutine.
Fetches ban for this user, if exists.
- Parameters
user_id (Union[
User,Snowflake]) – ID of user who was banned
- async fetch_bans() Iterator[acord.models.guild.Ban]¶
This function is a coroutine.
Returns all the users banned in the guild
- async fetch_channels() Iterator[acord.models.channels.base.Channel]¶
This function is a coroutine.
Fetches all channels in the guild, doesn’t include threads!
- async fetch_emoji(emoji_id: acord.models.Snowflake) acord.models.emoji.Emoji¶
This function is a coroutine.
Fetches a single emoji, using provided ID
- Parameters
emoji_id (
Snowflake) – id of emoji to fetch
- async fetch_emojis() Iterator[acord.models.emoji.Emoji]¶
This function is a coroutine.
Fetches all emojis in guild
- async fetch_event(event_id: acord.models.Snowflake) acord.models.guild_sched_event.GuildScheduledEvent¶
This function is a coroutine.
Fetches a scheduled event from the guild
- Parameters
event_id (
Snowflake) – ID of event to fetch
- async fetch_events() Iterator[acord.models.guild_sched_event.GuildScheduledEvent]¶
This function is a coroutine.
Fetches all scheduled events for guild
- async fetch_guild_widget_image(*, style: acord.models.guild.GuildWidgetImageStyle = GuildWidgetImageStyle.shield) _io.BytesIO¶
This function is a coroutine.
Fetches guild widget image, using one of
GuildWidgetImageStyle. Returnsio.BytesIOwith the image in it.- Parameters
style (
GuildWidgetImageStyle) – Style of banner
- async fetch_integrations() Iterator[acord.models.integrations.Integration]¶
This function is a coroutine.
Returns an iterator of integrations in the guild
- async fetch_member(*, member: Union[acord.models.member.Member, acord.models.Snowflake]) Optional[acord.models.member.Member]¶
This function is a coroutine.
Fetches a member from the guild
- Parameters
member (Union[
Member,Snowflake]) – Member to fetch
- async fetch_members(*, limit: int = 1, after: acord.models.Snowflake = 0) Iterator[acord.models.member.Member]¶
This function is a coroutine.
Fetches guild members
- Parameters
limit (
int) – How many many members to fetch, must be less then 1000 and greater then 1. Defaults to 1!after (
Snowflake) – Fetches users after this user
- async fetch_members_by_name(query: str, *, limit: int = 1) Iterator[acord.models.member.Member]¶
This function is a coroutine.
Fetches members by there username(s) or nickname(s)
- fetch_prune_count(*, days: int = 7, include_roles: List[acord.models.roles.Role] = []) int¶
This function is a coroutine.
Fetches guild prune count and returns the count, without actually pruning members.
- async fetch_regions() Iterator[acord.models.channels.voice.VoiceRegion]¶
This function is a coroutine.
Returns an iterator of voice region objects for the guild.
- async fetch_roles() Iterator[acord.models.roles.Role]¶
This function is a coroutine.
Fetches roles in guild
- async fetch_sticker(sticker_id: acord.models.Snowflake) acord.models.sticker.Sticker¶
This function is a coroutine.
Fetches a single sticker, using provided ID
- Parameters
sticker_id (
Snowflake) – id of sticker to fetch
- async fetch_stickers() Iterator[acord.models.sticker.Sticker]¶
This function is a coroutine.
Fetches all stickers in guild
- async fetch_template(code: str, /) acord.models.guild_template.GuildTemplate¶
This function is a coroutine.
Fetches a guild template
- Parameters
code (
str) – template code to fetch
- async fetch_templates() Iterator[acord.models.guild_template.GuildTemplate]¶
This function is a coroutine.
Fetches all templates in the guild
- async fetch_vanity_invite() acord.models.invite.Invite¶
This function is a coroutine.
Fetches guild vanity invite
- async fetch_webhooks() Iterator[acord.webhooks.main.Webhook]¶
This function is a coroutine.
Fetches all webhooks in guild
- async fetch_welcome_screen() acord.models.guild.WelcomeScreen¶
This function is a coroutine.
Fetches guild welcome screen
- async fetch_widget() Dict[str, Any]¶
This function is a coroutine.
Fetches guild widget, returns the raw data as of now
- async fetch_widget_settings() acord.models.guild.GuildWidget¶
This function is a coroutine.
Returns the guild widget settings
- get_channel(channel_id: acord.models.Snowflake, /) Optional[acord.models.channels.base.Channel]¶
This is a function.
Gets a channel from cache, which only belongs to this guild
- Parameters
channel_id (
Snowflake) – ID of channel to get
- get_member(member_id: acord.models.Snowflake, /) Optional[acord.models.member.Member]¶
This is a function.
Gets a member from internal mapping
- Parameters
member_id (
Snowflake) – ID of member to get
- move_roles(*positons: acord.payloads.RoleMovePayload, reason: str = None) Iterator[acord.models.roles.Role]¶
This function is a coroutine.
Modify positon of roles in guild
- Parameters
*positions (
RoleMovePayload) –Arguments of role move payloads, or dict with keys:
id:
Snowflakeposition:
int
Were id is the role ID and position is its new position
- prune(*, days: int = 7, compute_prune_count: bool = True, include_roles: List[acord.models.roles.Role] = [], reason: str = None) Optional[int]¶
This function is a coroutine.
Prunes members, returns amount of pruned IF
compute_prune_countis True.
- async unban(user_id: Union[acord.models.user.User, acord.models.Snowflake], *, reason: Optional[str] = None) None¶
This function is a coroutine.
Removes ban from user
- Parameters
user_id (Union[
User,Snowflake]) – user ID to be unbanned
- afk_channel_id: Optional[acord.models.Snowflake]¶
AFK channel id
- application_id: Optional[acord.models.Snowflake]¶
application id of the guild creator if it is bot-created
- channels: Dict[acord.models.Snowflake, acord.models.channels.base.Channel]¶
All channels in the guild
- created_at: Optional[datetime.datetime]¶
when the guild was created
- default_message_notifications: acord.bases.enums.guild.GuildMessageNotification¶
Default message notification
- emojis: Dict[acord.models.Snowflake, acord.models.emoji.Emoji]¶
List of emojis in guild
- explicit_content_filter: acord.bases.enums.guild.ExplicitContentFilterLevel¶
explicit content filter level
- id: acord.models.Snowflake¶
Guild ID
- joined_at: datetime.datetime¶
When the user joined this guild
- members: Dict[acord.models.Snowflake, acord.models.member.Member]¶
Mapping of all members in guild
- mfa_level: acord.bases.enums.guild.MFALevel¶
required MFA level for the guild
- nsfw_level: acord.bases.enums.guild.NSFWLevel¶
Guild NSFW level
- owner_id: acord.models.Snowflake¶
ID of the guild owner
Whether Boosts progress bar is enabled
Number of guild boosts
premium tier (Server Boost level)
- presences: Optional[List[Dict[str, Any]]]¶
presences of the members in the guild, will only include non-offline members if the size is greater than large threshold
- public_updates_channel_id: Optional[acord.models.Snowflake]¶
the id of the channel where admins and moderators of Community guilds receive notices from Discord
- roles: Dict[acord.models.Snowflake, acord.models.roles.Role]¶
List of roles in the guild
- rules_channel_id: Optional[acord.models.Snowflake]¶
the id of the channel where Community guilds can display rules and/or guidelines
- stage_instances: Optional[List[Any]]¶
Stage instances in the guild
- stickers: Optional[Dict[acord.models.Snowflake, acord.models.sticker.Sticker]]¶
List of guild stickers
- system_channel_id: Optional[acord.models.Snowflake]¶
the id of the channel where guild notices such as welcome messages and boost events are posted
- threads: Optional[Dict[acord.models.Snowflake, acord.models.channels.thread.Thread]]¶
Mapping of threads in the guild
Whether guild is operational or lost due to outage
- verification_level: acord.bases.enums.guild.VerificationLevel¶
verification level required for the guild
- voice_states: Optional[List[Any]]¶
array of partial voice state objects
Guild Template¶
- class acord.GuildTemplate(*, conn: Any = None, code: str, name: str, description: str = None, usage_count: int, creator_id: acord.models.Snowflake, creator: acord.models.user.User, created_at: str, updated_at: str, source_guild_id: acord.models.Snowflake, serialized_source_guild: Any = None, is_dirty: bool = None)¶
- async delete() acord.models.guild_template.GuildTemplate¶
This function is a coroutine.
Deletes template, returns template on success.
- async edit(**data) acord.models.guild_template.GuildTemplate¶
This function is a coroutine.
Edits current template
- async sync() acord.models.guild_template.GuildTemplate¶
This function is a coroutine.
Syncs current guild template.
- creator: acord.models.user.User¶
the user who created the template
- creator_id: acord.models.Snowflake¶
the ID of the user who created the template
- serialized_source_guild: acord.models.guild.Guild¶
the guild snapshot this template contains
- source_guild_id: acord.models.Snowflake¶
the ID of the guild this template is based on
Invite¶
- clsInvite.from_code
- asyncdelete
- class acord.Invite(*, conn: Any = None, code: str, guild: Any = None, channel: acord.models.channels.base.Channel = None, inviter: acord.models.user.User = None, target_type: int = None, target_user: acord.models.user.User = None, target_application: Any = None, approximate_presence_count: int = None, approximate_member_count: int = None, expires_at: datetime.datetime = None, stage_instance: acord.models.invite.StageInstanceInvite = None, guild_scheduled_event: Any = None)¶
- async delete(*, reason: str) None¶
This function is a coroutine.
Deletes this invite
- Parameters
reason (
str) – Reason for deleting invite
- async classmethod from_code(code: str, **params) acord.models.invite.Invite¶
This function is a coroutine.
Creates a new invite from its code, fetches from API.
Warning
This will return an object without a conn parameters, so methods like
Invite.delete()will not function.
- channel: Optional[acord.models.channels.base.Channel]¶
the channel this invite is for
- expires_at: Optional[datetime.datetime]¶
the expiration date of this invite
- guild: Optional[acord.models.guild.Guild]¶
the guild this invite is for
- guild_scheduled_event: Optional[Any]¶
guild scheduled event
- inviter: Optional[acord.models.user.User]¶
the user who created the invite
- stage_instance: Optional[acord.models.invite.StageInstanceInvite]¶
stage instance data if there is a public Stage instance in the Stage channel this invite is for
- target_application: Optional[Any]¶
the embedded application to open for this voice channel embedded application invite
- target_user: Optional[acord.models.user.User]¶
the user whose stream to display for this voice channel stream invite
Member¶
- asyncadd_role
- asyncadd_roles
- asyncban
- asyncedit
- asynckick
- asyncremove_role
- asyncremove_roles
- class acord.Member(*, conn: Any = None, user: acord.models.user.User = None, nick: str = None, avatar: str = None, roles: List[acord.models.Snowflake], joined_at: datetime.datetime, premium_since: datetime.datetime = None, deaf: bool, mute: bool, pending: bool = None, permissions: str = None, guild_id: acord.models.Snowflake)¶
Represents a guild member.
- user¶
The User object of the member. Not included in MESSAGE_CREATE and MESSAGE_UPDATE events
- Type
- roles¶
List of role IDs of roles the user has
- Type
List[
Snowflake]
- joined_at¶
The time the user joined the guild
- Type
When the user started boosting the guild
- Type
- pending¶
Whether if the member is pending verification. Not included in NONE-GUILD-EVENTS events
- Type
- guild_id¶
ID of the guild member is in
- Type
Snowflake
- async add_role(role: acord.models.roles.Role, *, reason: Optional[str] = None) None¶
This function is a coroutine.
Adds a single role to user, for more roles consider using:
- async add_roles(*roles, reason: Optional[str] = None) acord.models.member.Member¶
This function is a coroutine.
Adds many roles to the member in one go, utility method for
Member.edit().
- async ban(*, reason: Optional[str] = None, delete_message_days: int = 0) None¶
This function is a coroutine.
Bans this member from the guild
- async edit(*, reason: Optional[str] = None, **data) acord.models.member.Member¶
This function is a coroutine.
Modifies current member
- Parameters
nick (
str) – New nickname for userroles (
str) – New roles for members, roles will be updated exactly as provided. If you wish to keep existing roles, useMember.add_role().mute (
bool) – whether the user is muted in voice channels. Raises BadRequest if user is not in a VC.deaf (
bool) – whether the user is deafened in voice channels. Raises BadRequest if user is not in a VC.channel_id (
Snowflake) – id of channel to move user to (if they are connected to voice).communication_disabled_until (
datetime.datetime) – User communication timeout. If set toNone, removes timeout.
- async kick(*, reason: Optional[str] = None) None¶
This function is a coroutine.
Kicks this member from the guild
- Parameters
reason (
str) – Reason for kicking member
- async remove_role(role: acord.models.roles.Role, *, reason: Optional[str] = None) None¶
This function is a coroutine.
Remove a role from member
- async remove_roles(*roles, reason: Optional[str] = None) acord.models.member.Member¶
This function is a coroutine.
Removes many roles from the member in one go, utility method for
Member.edit().
Message¶
- asyncadd_reaction
- asyncclear_reactions
- asynccrosspost
- asyncdelete
- asyncedit
- asyncget_reactions
- asyncpin
- asyncrefetch
- asyncremove_reaction
- asyncreply
- asyncunpin
- class acord.Message(*, conn: Any = None, activity: Any = None, application: acord.models.application.Application = None, attachments: List[acord.models.attachment.Attachment], author: acord.models.user.User, channel_id: int, components: List[acord.bases.components.ActionRow], content: str, edited_timestamp: Optional[Union[bool, datetime.datetime]] = None, embeds: List[acord.bases.embeds.Embed], flags: acord.bases.flags.message.MessageFlags, id: acord.models.Snowflake, interaction: Any = None, guild_id: acord.models.Snowflake = None, member: acord.models.member.Member = None, mentions: List[Union[acord.models.user.User, Any]], mention_everyone: bool, mention_roles: List[Any], mention_channels: List[Any] = None, nonce: int = None, pinned: bool, reactions: List[Any] = [], referenced_message: Optional[Union[Message, MessageReference]], thread: Any = None, timestamp: datetime.datetime, tts: bool, type: int, sticker_items: List[acord.models.sticker.Sticker] = None, stickers: List[Any] = None, webhook_id: int = None)¶
- async add_reaction(emoji: Union[str, acord.models.emoji.Emoji]) None¶
Add an emoji to the message. Raises 403 if you lack permissions or 404 if message not found.
- async clear_reactions(*, emoji: Optional[Union[str, acord.models.emoji.Emoji]] = None) None¶
Clear all reactions/x reactions on a message. Raises 403 if you lack permissions or 404 if message not found.
- async crosspost() acord.models.message.Message¶
Crossposts a message in a news channel
- async delete(*, reason: Optional[str] = None) None¶
Deletes the message from the channel. Raises 403 is you don’t have sufficient permissions or 404 is the message no longer exists.
- Parameters
reason (
str) – Reason for deleting message, shows up in AUDIT-LOGS
- async edit(**data) acord.models.message.Message¶
This function is a coroutine.
Modifies current message
- Parameters
content (
str) – new content for messageembeds (Union[List[
Embed],Embed]) –List of embeds to update message with.
Warning
Embeds are updated EXACTLY as they are provided.
So doing
Message.edit(embeds=Embed)will remove previous embeds. For extending embeds you can use something like:from acord import Embed embeds = Message.embeds newEmbed = Embed(**kwargs) embeds.append(newEmbed) await Message.edit(embeds=embeds)
flags (
MessageFlags) –edit message flags
Warning
only
MessageFlags.SUPPRESS_EMBEDScan currently be set/unsetallowed_mentions (
AllowedMentions) – edit allowed mentions for messagefiles (Union[List[
File],File]) – list of files to update message with, works the same way as the embeds parameter
- get_reactions(emoji: Union[str, acord.models.emoji.Emoji], *, update: bool = True, after: Union[acord.models.user.User, acord.models.Snowflake], limit: int = 25) List[acord.models.user.User]¶
This function is a coroutine.
Fetches users from a reaction
- async refetch() Optional[acord.models.message.Message]¶
This function is a coroutine.
Attempts to fetch the same message from the API again
- async remove_reaction(emoji: Union[str, acord.models.emoji.Emoji], user_id: Union[str, int] = '@me') None¶
Removes a reaction on a message set by a specified user. Raises 403 if you lack permissions or 404 if message not found.
- async reply(**data) acord.models.message.Message¶
Shortcut for Message.Channel.send(…, reference=self)
- activity: Any¶
sent with Rich Presence-related chat embeds
- application: Optional[acord.models.application.Application]¶
sent with Rich Presence-related chat embeds
- attachments: List[acord.models.attachment.Attachment]¶
List of Attachment objects
- author: acord.models.user.User¶
User object of who sent the message
- property channel¶
Returns the channel message was sent in
- components: List[acord.bases.components.ActionRow]¶
List of all components in the message
- embeds: List[acord.bases.embeds.Embed]¶
List of embeds
- flags: acord.bases.flags.message.MessageFlags¶
Message flags
- property guild¶
Returns the guild message was sent in
- guild_id: Optional[acord.models.Snowflake]¶
Guild ID of were message was sent
- id: acord.models.Snowflake¶
Message ID
- interaction: Optional[acord.models.interaction.Interaction]¶
Message Interaction
- member: Optional[acord.models.member.Member]¶
Member object of who sent the message
- mention_channels: Optional[List[acord.models.channels.base.Channel]]¶
List of mentioned channels
- mention_roles: List[Any]¶
If message mentioned any roles
- mentions: List[Union[acord.models.user.User, Any]]¶
List of mentioned users
- reactions: Optional[List[Any]]¶
List of reactions
- referenced_message: Optional[Union[acord.models.message.Message, acord.models.message.MessageReference]]¶
Replied message
- sticker_items: Optional[List[acord.models.sticker.Sticker]]¶
List of stickers
- thread: Optional[acord.models.channels.thread.Thread]¶
Thread were message was sent
- timestamp: datetime.datetime¶
List of reactions
- webhook_id: acord.models.Snowflake¶
Webhook ID
Message Reference¶
Sticker¶
- clsSticker.from_code
- asyncdelete
- asyncedit
- class acord.Sticker(*, conn: Any = None, id: acord.models.Snowflake, pack_id: acord.models.Snowflake = None, name: str, description: str = None, tags: str, asset: str = None, type: int, format_type: int, available: bool = None, guild_id: acord.models.Snowflake = None, user: acord.models.user.User = None, sort_value: int = None)¶
- async delete(*, reason: Optional[str] = None) None¶
This function is a coroutine.
Deletes this sticker
- async edit(*, reason: Optional[str] = None, **data) acord.models.sticker.Sticker¶
This function is a coroutine.
Modifies sticker
- async classmethod from_code(client, sticker_id: acord.models.Snowflake) acord.models.sticker.Sticker¶
This function is a coroutine.
Fetches sticker from API, by using existing client and id
- Parameters
client (
Client) – client to fetch sticker fromsticker_id (
Snowflake) – id of sticker to fetch
- available: Optional[bool]¶
whether this guild sticker can be used, may be false due to loss of Server Boosts
- guild_id: Optional[acord.models.Snowflake]¶
id of the guild that owns this sticker
- id: acord.models.Snowflake¶
ID of the sticker
- pack_id: Optional[acord.models.Snowflake]¶
for standard stickers, id of the pack the sticker is from
- user: Optional[acord.models.user.User]¶
the user that uploaded the guild sticker
Stage Channel¶
- class acord.Stage(*, conn: Any = None, id: int, type: acord.bases.flags.channels.ChannelTypes = ChannelTypes.GUILD_STAGE_VOICE, guild_id: acord.models.Snowflake, channel_id: acord.models.Snowflake, topic: str, privacy_level: acord.bases.enums.stage.StagePrivacyLevel, discoverable_disabled: bool)¶
- async delete(*, reason: Optional[str] = None) None¶
This function is a coroutine.
Deletes this stage instance
- Parameters
reason (
str) – Reason for deleting instance
- async edit(*, reason: Optional[str] = None, **data) acord.models.channels.stage.Stage¶
This function is a coroutine.
Edits this stage instance, returning updated instance
- channel_id: acord.models.Snowflake¶
The id of the associated Stage channel
- guild_id: acord.models.Snowflake¶
The guild id of the associated Stage channel
- privacy_level: acord.bases.enums.stage.StagePrivacyLevel¶
The privacy level of the Stage instance
Text Channel¶
- asyncbulk_delete
- asynccreate_invite
- asynccreate_thread
- asynccreate_webhook
- asyncedit
- asyncfetch_active_threads
- asyncfetch_invites
- asyncfetch_joined_private_archived_threads
- asyncfetch_message
- asyncfetch_messages
- asyncfetch_private_archived_threads
- asyncfetch_public_archived_threads
- asyncfetch_webhooks
- asyncfollow
- defget_message
- asyncpins
- asyncsend
- asynctrigger_typing
- class acord.TextChannel(*, conn: Any = None, id: int, type: acord.bases.flags.channels.ChannelTypes, guild_id: int, position: int, permission_overwrites: List[acord.bases.permissions_overwrite.PermissionsOverwrite] = [], name: str, topic: str = None, nsfw: bool = False, last_message_id: int = None, parent_id: int = None, last_pin_timestamp: datetime.datetime = None, permissions: str = None, rate_limit_per_user: int = None, default_auto_archive_duration: int = None, created_at: datetime.datetime = None)¶
- bulk_delete(*messages: Union[acord.models.message.Message, acord.models.Snowflake], reason: str = None) None¶
This function is a coroutine.
Deletes messages in bulk, in a channel.
Warning
When deleting in bulk, you need atleast 2 messages and less then 100.
You must also provide your own messages to delete, for a
purgelike method, use messages fromTextChannel.fetch_messages().
- async create_invite(*, reason: Optional[str] = None, **data) List[acord.models.invite.Invite]¶
This function is a coroutine.
Creates new invite in channel
- max_age:
int How long the invite can be used for, must be greater or equal to 0 and less then 604800 (7 Days).
Note
0 is for never
- max_uses:
int How many times invite can be used, before expiring. Must be greater or equal to 0 and less then 100.
Note
0 is for infinite
- temporary:
bool Whether this invite only grants temporary membership
- unique:
bool If true, don’t try to reuse a similar invite (useful for creating many unique one time use invites)
- max_age:
- async create_thread(*, message: Optional[Union[acord.models.message.Message, acord.models.Snowflake]] = None, reason: Optional[str] = None, **options) Optional[acord.models.channels.thread.Thread]¶
This function is a coroutine.
Creates a thread in this channel
- Parameters
message (Union[
Message,Snowflake]) – Message to start thread with
- async create_webhook(*, reason: Optional[str] = None, **data) acord.webhooks.main.Webhook¶
This function is a coroutine.
Creates a new webhook for this channel
- async edit(**options) Optional[acord.models.channels.base.Channel]¶
This function is a coroutine.
Modifies a guild channel, fires a
channel_updateevent if channel is updated.- Parameters
name (
str) – New name for the channeltype (Literal[0, 5]) – Change the type for the channel, currently on GUILD_TEXT and GUILD_NEWS is supported
position (
int) – Change the position of the channeltopic (
str) – Change the channels topic, if you wish to remove it use theMISSINGclassnsfw (
bool) – Whether to mark channel as NSFWratelimit (
int) – Change ratelimit value for channelpermission_overwrite (List[
PermissionsOverwrite]) – List of permissions to overwrite in the channelcategory (Union[
int, CategoryChannel]) – Move the channel to a different category, useMISSINGfor no categoryarchive_duration (Literal[0, 60, 1440, 4230, 10080]) – Change the default archive duration on a thread, use
MISSINGor 0 for no timeout
- async fetch_active_threads() Iterator[acord.models.channels.thread.Thread]¶
This function is a coroutine.
Fetches all active threads in channel
Warning
Depreciated
This method will no longer work when using API Version >= 10, instead implement
Guild.fetch_active_threads()
- async fetch_invites() List[acord.models.invite.Invite]¶
This function is a coroutine.
Fetches all invites from channel
- async fetch_joined_private_archived_threads(*, before: Optional[datetime.datetime] = None, limit: Optional[int] = None) Iterator[acord.models.channels.thread.Thread]¶
This function is a coroutine.
Fetches all private archived threads, that the client has joined
- fetch_message(message_id: Union[acord.models.message.Message, acord.models.Snowflake]) Optional[acord.models.message.Message]¶
This function is a coroutine.
Fetch a message directly from channel/thread
- Parameters
message_id (Union[
Message,Snowflake]) – ID of the message to fetch
- fetch_messages(*, around: Optional[Union[acord.models.message.Message, int]] = None, before: Optional[Union[acord.models.message.Message, int]] = None, after: Optional[Union[acord.models.message.Message, int]] = None, limit: Optional[int] = 50) Iterator[acord.models.message.Message]¶
This function is a coroutine.
Fetch messages directly from a channel
- async fetch_private_archived_threads(*, before: Optional[datetime.datetime] = None, limit: Optional[int] = None) Iterator[acord.models.channels.thread.Thread]¶
This function is a coroutine.
Fetches all private archived thread in channel
- async fetch_public_archived_threads(*, before: Optional[datetime.datetime] = None, limit: Optional[int] = None) Iterator[acord.models.channels.thread.Thread]¶
This function is a coroutine.
Fetches all public archived thread in channel
- async fetch_webhooks() Iterator[acord.webhooks.main.Webhook]¶
This function is a coroutine.
Fetches all webhooks in channel
- follow(*, channel: Union[acord.models.channels.base.Channel, acord.models.Snowflake]) Dict[str, acord.models.Snowflake]¶
This function is a coroutine.
Follows a guild news channel
- Parameters
channel (Union[
Channel,Snowflake]) – Target channel, or channel to recieve messages from this channel.- Returns
A dictionary with the keys
* channel_id (source channel id)
* webhook_id (created target webhook id)
- get_message(message_id: Union[acord.models.message.Message, acord.models.Snowflake]) Optional[acord.models.message.Message]¶
This is a function.
Returns the message stored in the internal cache, may be outdated
- Parameters
message_id (Union[
Message,Snowflake]) – ID of message to get
- async pins() Iterator[acord.models.message.Message]¶
This function is a coroutine.
Fetches channel/thread pins
- async send(**data) Optional[acord.models.message.Message]¶
This function is a coroutine.
Create a new message in the channel/thread
- Parameters
content (
str) – Message content, must be below2000chars.files (Union[List[:class:`File`], :class:`File`]) – A file or a list of files to be sent. File must not be closed else an error is raised.
message_reference (Union[
MessageReference]) – A message to reply to, client must be able to read messages in the channel/thread.tts (
bool) – Whether this is a TTS messageembeds (Union[List[:class:`Embed`], :class:`File`]) – An embed or a list of embeds to send
components (List[
ActionRow]) – A list of action rows to send, refer to me for a more detailed guide.
- async trigger_typing() None¶
This function is a coroutine.
Creates a typing indicator in this channel/thread.
- created_at: Optional[datetime.datetime]¶
When this channel was created
- property guild¶
Returns the guild were channel was created in
- last_pin_timestamp: Optional[datetime.datetime]¶
Last pinned message in channel, may be None
- permission_overwrites: Optional[List[PermissionsOverwrite]]¶
Channel Permissions
Thread¶
- asyncadd_member
- asyncedit
- asyncfetch_member
- asyncfetch_members
- asyncfetch_message
- defget_message
- asyncjoin
- asyncleave
- asyncpins
- asyncremove_member
- asyncsend
- asynctrigger_typing
- class acord.Thread(*, conn: Any = None, id: acord.models.Snowflake, type: acord.bases.flags.channels.ChannelTypes, guild_id: acord.models.Snowflake, parent_id: acord.models.Snowflake, owner_id: acord.models.Snowflake, name: str, last_message_id: acord.models.Snowflake = None, last_pin_timestamp: datetime.datetime = None, rate_limit_per_user: int = None, message_count: int = None, member_count: int = None, thread_metadata: acord.models.channels.thread.ThreadMeta, members: Dict[acord.models.Snowflake, acord.models.channels.thread.ThreadMember] = {})¶
- async add_member(*, member: Union[acord.models.member.Member, acord.models.Snowflake]) None¶
This function is a coroutine.
Adds a member to the thread
- Parameters
member (Union[
Member,Snowflake]) –
- async edit(*, reason: Optional[str] = None, **options) Optional[acord.models.channels.thread.Thread]¶
This function is a coroutine.
Edits the current thread
- Parameters
reason (
str) – Reason for editing threadname (
str) – New name for threadarchived (
bool) – Whether the thread should be archived or notauto_archive_duration (
int) – New auto archive duration, is set from parent channel OR during creationrate_limit_per_user (
int) – New slowmode for users in thread
- async fetch_member(*, member: Union[acord.models.member.Member, acord.models.Snowflake], as_guild_member: bool = False) Optional[Union[acord.models.channels.thread.ThreadMember, acord.models.member.Member]]¶
This function is a coroutine.
Fetches member from thread
- Parameters
member (Union[
Member,Snowflake]) – Member to fetchas_guild_member (
bool) – whether to return the fetched member as aThreadMemberobject orMember
- async fetch_members(*, as_guild_member: bool = False) Iterator[Union[acord.models.member.Member, acord.models.channels.thread.ThreadMember]]¶
This function is a coroutine.
Fetches all members in the thread
- Parameters
as_guild_member (
bool) – Whether to return the thread members asThreadMemberorMember
- fetch_message(message_id: Union[acord.models.message.Message, acord.models.Snowflake]) Optional[acord.models.message.Message]¶
This function is a coroutine.
Fetch a message directly from channel/thread
- Parameters
message_id (Union[
Message,Snowflake]) – ID of the message to fetch
- get_message(message_id: Union[acord.models.message.Message, acord.models.Snowflake]) Optional[acord.models.message.Message]¶
This is a function.
Returns the message stored in the internal cache, may be outdated
- Parameters
message_id (Union[
Message,Snowflake]) – ID of message to get
- async pins() Iterator[acord.models.message.Message]¶
This function is a coroutine.
Fetches channel/thread pins
- async remove_member(*, member: Union[acord.models.member.Member, acord.models.Snowflake]) None¶
This function is a coroutine.
Removes a member from the thread
- Parameters
member (Union[
Member,Snowflake]) –
- async send(**data) Optional[acord.models.message.Message]¶
This function is a coroutine.
Create a new message in the channel/thread
- Parameters
content (
str) – Message content, must be below2000chars.files (Union[List[:class:`File`], :class:`File`]) – A file or a list of files to be sent. File must not be closed else an error is raised.
message_reference (Union[
MessageReference]) – A message to reply to, client must be able to read messages in the channel/thread.tts (
bool) – Whether this is a TTS messageembeds (Union[List[:class:`Embed`], :class:`File`]) – An embed or a list of embeds to send
components (List[
ActionRow]) –A list of action rows to send, refer to me for a more detailed guide.
- async trigger_typing() None¶
This function is a coroutine.
Creates a typing indicator in this channel/thread.
- guild_id: Snowflake¶
Guild id of were thread belongs
- id: Snowflake¶
Thread id
- last_message_id: Optional[Snowflake]¶
Last message sent in thread
- last_pin_timestamp: Optional[datetime.datetime]¶
Last pinned message in thread
- members: Dict[Snowflake, ThreadMember]¶
Mapping of members in thread, fills with each fetch
- owner_id: Snowflake¶
Id of user who created this thread
- parent_id: Snowflake¶
Channel id of were thread was created from
- rate_limit_per_user: Optional[int]¶
amount of seconds a user has to wait before sending another message
- thread_metadata: ThreadMeta¶
Additional data about thread
Thread Member¶
- class acord.ThreadMember(*, id: acord.models.Snowflake, user_id: acord.models.Snowflake, join_timestamp: datetime.datetime, flags: int)¶
-
- id: acord.models.Snowflake¶
ID of thread
- join_timestamp: datetime.datetime¶
When did this user join this thread
- user_id: acord.models.Snowflake¶
ID of user in thread
Thread Metadata¶
- class acord.ThreadMeta(*, archived: bool, archive_timestamp: datetime.datetime, auto_archive_duration: int, locked: bool, invitable: bool = None)¶
- archive_timestamp: datetime.datetime¶
Time of when thread was archived
Role¶
- class acord.Role(*, conn: Any = None, id: int, name: str, color: acord.bases.embeds.Color, hoist: bool, icon: str = None, unicode_emoji: str = None, position: int, permissions: acord.bases.flags.permissions.Permissions, managed: bool, mentionable: bool, tags: acord.models.roles.RoleTags = None, guild_id: int)¶
- async delete(*, reason: Optional[str] = None)¶
This function is a coroutine.
Deletes role from guild
- Parameters
reason (
str) – Reason for deleting role
- async edit(*, reason: Optional[str] = None, **data) acord.models.roles.Role¶
This function is a coroutine.
Edits guild role
- Parameters
name (
str) – name for rolepermissions (
Permissions) – enabled/disabled permissionscolor (
Color) – Colour of the rolehoist (
bool) – whether the role should be displayed separately in the sidebaricon (
File) – the role’s icon imageunicode_emoji (
str) – role’s unicode emojimentionable (
bool) – whether the role should be mentionablereason (
str) – Reason for deleting role
- color: acord.bases.embeds.Color¶
Colour of role
- permissions: acord.bases.flags.permissions.Permissions¶
Role permissions
- tags: Optional[acord.models.roles.RoleTags]¶
Role tags
User¶
- asynccreate_dm
- defmutual_guilds
- asyncsend
- class acord.User(*, conn: Any = None, id: int, username: str, discriminator: str, avatar: str = None, bot: bool = None, system: bool = None, mfa_enabled: bool = None, banner: str = None, accent_color: int = None, locale: str = None, verified: bool = None, flags: acord.bases.flags.user.UserFlags = None, premium_type: int = None, public_flags: acord.bases.flags.user.UserFlags = 0, email: str = None, dm_id: acord.models.Snowflake = None)¶
Represents a Discord user.
- id¶
the user’s id
- Type
acord.Snowflake
- flags¶
the user’s account flags
- Type
the type of Nitro subscription on a user’s account
- Type
- public_flags¶
the public flags on a user’s account
- Type
- async send(**data) Any¶
This function is a coroutine.
Automatically creates DM with user and sends message
:param all parameters are the same as
TextChannel.send():
Interaction¶
- asyncdelete_original_response
- asyncdelete_response
- asyncedit
- asyncedit_response
- asyncfetch_message
- asyncfetch_original_response
- asyncrespond
- class acord.Interaction(*, conn: Any = None, id: acord.models.Snowflake, application_id: acord.models.Snowflake, type: acord.bases.enums.interactions.InteractionType, token: str, version: int, data: acord.models.interaction.InteractionData = None, guild_id: acord.models.Snowflake = None, channel_id: acord.models.Snowflake = None, member: acord.models.member.Member = None, user: acord.models.user.User = None, message: acord.models.message.Message = None)¶
- async delete_original_response() None¶
This function is a coroutine.
Deletes original message that was created when interaction responded
- async delete_response(message_id: acord.models.Snowflake) None¶
This function is a coroutine.
Deletes message that was created by this interaction
- async edit(*, ack: bool = False, **data) None¶
This function is a coroutine.
Edits original message created by interaction
- Parameters
ack (
bool) – ACK an interaction and edit the original message later; the user does not see a loading state**data – Rest of the parameters are the same as,
TextChannel.send()
- async edit_response(message_id: acord.models.Snowflake, *, ack: bool = False, **data) None¶
This function is a coroutine.
Edits a follow up message sent by interaction
- Parameters
message_id (
Snowflake) – ID of message to editack (
bool) – ACK an interaction and edit the original message later; the user does not see a loading state**data – Rest of the parameters are the same as,
TextChannel.send()
- async fetch_message(message_id: acord.models.Snowflake)¶
This function is a coroutine.
Fetches a followup message created by interaction
- async fetch_original_response() Any¶
This function is a coroutine.
Fetches original message that was created when interaction responded.
- async respond(*, ack: bool = False, followup: bool = False, **data) None¶
This function is a coroutine.
Responds to an interaction.
- Parameters
flags (
IMessageFlags) – Additional flags for interaction followups.ack (
bool) – Whether to return a loading status, requires you to resend request using,Interaction.edit()followup (
bool) – Whether the message is a followup and not a response.**data – Rest of the parameters are the same as,
TextChannel.send()
- application_id: acord.models.Snowflake¶
id of the application this interaction is for
- channel_id: Optional[acord.models.Snowflake]¶
the channel it was sent from
- data: Optional[acord.models.interaction.InteractionData]¶
the command data payload
- guild_id: Optional[acord.models.Snowflake]¶
the guild it was sent from
- id: acord.models.Snowflake¶
ID of interaction
- member: Optional[acord.models.member.Member]¶
guild member data for the invoking user, including permissions
- message: acord.models.message.Message¶
for components, the message they were attached to
- type: acord.bases.enums.interactions.InteractionType¶
the type of interaction
- user: Optional[acord.models.user.User]¶
user payloadject for the invoking user, if invoked in a DM
Attachment¶
Category Channel¶
- class acord.CategoryChannel(*, conn: Any = None, id: int, type: acord.bases.flags.channels.ChannelTypes, permission_overwrites: List[acord.bases.permissions_overwrite.PermissionsOverwrite] = [], name: str, nsfw: bool = False, position: int, guild_id: acord.models.Snowflake)¶
- guild_id: Snowflake¶
ID of guild were category belongs
- permission_overwrites: Optional[List[PermissionsOverwrite]]¶
List of permissions for category
DM Channels¶
DM Channel¶
Between 1 user.
- class acord.DMChannel(*, conn: Any = None, id: int, type: acord.bases.flags.channels.ChannelTypes, last_message_id: acord.models.Snowflake = None, recipients: List[acord.models.user.User])¶
- last_message_id: Optional[Snowflake]¶
ID of last message sent in channel
Group DM Channel¶
Between multiple users
- class acord.GroupDMChannel(*, conn: Any = None, id: int, type: acord.bases.flags.channels.ChannelTypes, last_message_id: acord.models.Snowflake = None, recipients: List[acord.models.user.User], icon: pydantic.networks.AnyHttpUrl = None, owner_id: acord.models.Snowflake)¶
- icon: Optional[AnyHttpUrl]¶
Icon of the group DM
- owner_id: Snowflake¶
ID of group owner
Integration¶
- class acord.Integration(*, conn: Any = None, id: acord.models.Snowflake, name: str, type: str, account: acord.models.integrations.IntegrationAccount, guild_id: acord.models.Snowflake, enabled: bool, syncing: bool = None, role_id: acord.models.Snowflake = None, enable_emoticons: bool = None, expire_behavior: acord.models.integrations.IntegrationExpBehaviour = None, expire_grace_period: int = None, user: acord.models.user.User = None, synced_at: datetime.datetime = None, subscriber_count: int = None, revoked: bool = None, application: acord.models.integrations.IntegrationApplication = None)¶
Voice Channel¶
- class acord.VoiceChannel(*, conn: Any = None, id: int, type: acord.bases.flags.channels.ChannelTypes, guild_id: acord.models.Snowflake, name: str, nsfw: bool = False, position: int, permission_overwrites: List[acord.bases.permissions_overwrite.PermissionsOverwrite] = [], bitrate: int, user_limit: int, parent_id: acord.models.Snowflake = None, rtc_region: str = None)¶
-
- guild_id: Snowflake¶
ID of guild were channel is in
- parent_id: Optional[Snowflake]¶
ID of category were channel is in
- permission_overwrites: Optional[List[PermissionsOverwrite]]¶
Permissions for channel
Webhook¶
- class acord.Webhook(adapter=None, *, id: acord.models.Snowflake, type: acord.webhooks.types.WebhookType, guild_id: acord.models.Snowflake = None, channel_id: acord.models.Snowflake, user: acord.models.user.User = None, name: str, avatar: str, token: str = None, application_id: acord.models.Snowflake, url: str = None)¶
- application_id: Snowflake¶
the bot/OAuth2 application that created this webhook
- channel_id: Snowflake¶
the channel id this webhook is for, if any
- guild_id: Optional[Snowflake]¶
the guild id this webhook is for, if any
- id: Snowflake¶
the id of the webhook
- type: WebhookType¶
the type of the webhook