discordaio.guild

Classes

class discordaio.guild.Guild(id=0, name='', icon='', splash='', owner=False, owner_id=0, permissions=0, region='', afk_channel_id=0, afk_timeout=0, embed_enabled=False, embed_channel_id=0, verification_level=0, default_message_notifications=0, explicit_content_filter=0, roles=[], emojis=[], features=[], mfa_level=0, application_id=0, widget_enabled=False, widget_channel_id=0, system_channel_id=0, joined_at=None, large=None, unavailable=None, member_count=None, voice_states=None, members=[], channels=None, presences=None)[source]

Represents a guild

New in version 0.2.0.

Note

Guilds in Discord represent an isolated collection of users and channels, and are often referred to as “servers” in the UI.

id

int – guild id

name

str – guild name (2-100 characters)

icon

str – icon hash

splash

str – splash hash

owner

bool, optional – whether or not the user is the owner of the guild

owner_id

int – id of owner

permissions

int, optional – total permissions for the user in the guild (does not include channel overrides)

region

str – voice region id for the guild

afk_channel_id

int – id of afk channel

afk_timeout

int – afk timeout in seconds

embed_enabled

bool, optional – is this guild embeddable (e.g. widget)

embed_channel_id

int, optional – id of embedded channel

verification_level

int – verification level required for the guild

default_message_notifications

int – default message notifications level

explicit_content_filter

int – explicit content filter level

roles

list of Role – roles in the guild

emojis

list of Emoji – custom guild emojis

features

list of Strings – enabled guild features

mfa_level

int – required MFA level for the guild

application_id

int – application id of the guild creator if it is bot-created

widget_enabled

bool, optional – whether or not the server widget is enabled

widget_channel_id

int, optional – the channel id for the server widget

system_channel_id

int – the id of the channel to which system messages are sent

joined_at

int, optional – timestamp when this guild was joined at

large

bool, optional – whether this is considered a large guild

unavailable

bool, optional – is this guild unavailable

member_count

int, optional – total number of members in this guild

voice_states

list of Partial – (without the guild_id key)

members

list of Guild – users in the guild

channels

list of Channel – channels in the guild

presences

list of Partial – presences of the users in the guild

Inheritance

Inheritance diagram of Guild
get_icon() → str[source]

Returns the guild icon

New in version 0.2.0.

Returns:The icon link
Return type:str
get_splash()[source]

Returns the guild splash

New in version 0.2.0.

Returns:The splash link
Return type:str
is_owner(member: discordaio.guild.GuildMember) → bool[source]

Returns wether the guild member is the owner of the guild

New in version 0.2.0.

Parameters:member (GuildMember) – The member
Returns:True if it’s the owner, False otherwise.
Return type:bool
class discordaio.guild.GuildMember(user=<User Object: #, 0>, nick='', roles=[], joined_at=None, deaf=False, mute=False)[source]

Represents a guild member

New in version 0.2.0.

user

User – user object

nick

str, optional – this users guild nickname (if one is set)

roles

list of int – array of role object ids

joined_at

int – timestamp when the user joined the guild

deaf

bool – if the user is deafened

mute

bool – if the user is muted

Inheritance

Inheritance diagram of GuildMember
class discordaio.guild.GuildEmbed(enabled=False, channel_id=0)[source]

Represents a guild embed

New in version 0.2.0.

enabled

bool – if the embed is enabled

channel_id

int – the embed channel id

Inheritance

Inheritance diagram of GuildEmbed
class discordaio.guild.IntegrationAccount(id='', name='')[source]

Represents a integration account

New in version 0.2.0.

id

str – id of the account

name

str – name of the account

Inheritance

Inheritance diagram of IntegrationAccount
class discordaio.guild.Integration(id=0, name='', type='', enabled=False, syncing=False, role_id=0, expire_behavior=0, expire_grace_period=0, user=None, account=None, synced_at=None)[source]

Represents a integration

New in version 0.2.0.

id

int – integration id

name

str – integration name

type

str – integration type (twitch, youtube, etc)

enabled

bool – is this integration enabled

syncing

bool – is this integration syncing

role_id

int – id that this integration uses for “subscribers”

expire_behavior

int – the behavior of expiring subscribers

expire_grace_period

int – the grace period before expiring subscribers

user

User – object user for this integration

account

Account – account information

synced_at

int – timestamp when this integration was last synced

Inheritance

Inheritance diagram of Integration
class discordaio.guild.Ban(reason='', user=None)[source]

Represents a ban

New in version 0.2.0.

reason

str – the reason for the ban

user

User – the banned user

Inheritance

Inheritance diagram of Ban