Application and entities that are used to describe guild templates on Discord.

Module Contents#

class hikari.templates.Template[source]#

Represents a template used for creating guilds.

code: str[source]#

The template’s unique ID.

created_at: datetime.datetime[source]#

When the template was created.

creator: hikari.users.User[source]#

The user who created the template.

description: Optional[str][source]#

The template’s description.

is_unsynced: bool[source]#

Whether this template is missing changes from it’s source guild.

name: str[source]#

The template’s name.

source_guild: TemplateGuild[source]#

The partial object of the guild this template is based on.

updated_at: datetime.datetime[source]#

When the template was last synced with the source guild.

usage_count: int[source]#

The number of times the template has been used to create a guild.

class hikari.templates.TemplateGuild[source]#

Bases: hikari.guilds.PartialGuild

The partial guild object attached to Template.

afk_channel_id: Optional[hikari.snowflakes.Snowflake][source]#

The ID for the channel that AFK voice users get sent to.

If None, then no AFK channel is set up for this guild.

afk_timeout: datetime.timedelta[source]#

Timeout for activity before a member is classed as AFK.

How long a voice user has to be AFK for before they are classed as being AFK and are moved to the AFK channel (Guild.afk_channel_id).

channels: Mapping[hikari.snowflakes.Snowflake, hikari.channels.GuildChannel][source]#

The channels for the guild.


hikari.channels.GuildChannel.id will be a unique placeholder on all the channel objects found attached this template guild.

default_message_notifications: Union[hikari.guilds.GuildMessageNotificationsLevel, int][source]#

The default setting for message notifications in this guild.

description: Optional[str][source]#

The guild’s description, if set.

explicit_content_filter: Union[hikari.guilds.GuildExplicitContentFilterLevel, int][source]#

The setting for the explicit content filter in this guild.

preferred_locale: str[source]#

The preferred locale to use for this guild.

This can only be change if GuildFeature.COMMUNITY is in Guild.features for this guild and will otherwise default to en-US.

roles: Mapping[hikari.snowflakes.Snowflake, TemplateRole][source]#

The roles in the guild.


hikari.guilds.Role.id will be a unique placeholder on all the role objects found attached this template guild.

system_channel_flags: hikari.guilds.GuildSystemChannelFlag[source]#

Return flags for the guild system channel.

These are used to describe which notifications are suppressed.

system_channel_id: Optional[hikari.snowflakes.Snowflake][source]#

The ID of the system channel or None if it is not enabled.

Welcome messages and Nitro boost messages may be sent to this channel.

verification_level: Union[hikari.guilds.GuildVerificationLevel, int][source]#

The verification level needed for a user to participate in this guild.

class hikari.templates.TemplateRole[source]#

Bases: hikari.guilds.PartialRole

The partial role object attached to Template.

color: hikari.colors.Color[source]#

The colour of this role.

This will be applied to a member’s name in chat if it’s their top coloured role.

is_hoisted: bool[source]#

Whether this role is hoisting the members it’s attached to in the member list.

members will be hoisted under their highest role where this is set to True.

is_mentionable: bool[source]#

Whether this role can be mentioned by all regardless of permissions.

permissions: hikari.permissions.Permissions[source]#

The guild wide permissions this role gives to the members it’s attached to.

This may be overridden by channel overwrites.