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

This module

Expand source code
Browse git
# -*- coding: utf-8 -*-
# cython: language_level=3
# Copyright (c) 2020 Nekokatt
# Copyright (c) 2021-present davfsa
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
"""Application and entities that are used to describe guild templates on Discord."""

from __future__ import annotations

__all__: typing.List[str] = ["Template", "TemplateGuild", "TemplateRole"]

import typing

import attr

from hikari import guilds
from hikari.internal import attr_extensions

if typing.TYPE_CHECKING:
    import datetime

    from hikari import channels as channels_
    from hikari import colors
    from hikari import locales
    from hikari import permissions as permissions_
    from hikari import snowflakes
    from hikari import users


@attr_extensions.with_copy
@attr.define(hash=True, kw_only=True, weakref_slot=False)
class TemplateRole(guilds.PartialRole):
    """The partial role object attached to `Template`."""

    permissions: permissions_.Permissions = attr.field(eq=False, hash=False, repr=False)
    """The guild wide permissions this role gives to the members it's attached to,

    This may be overridden by channel overwrites.
    """

    color: colors.Color = attr.field(eq=False, hash=False, repr=True)
    """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 = attr.field(eq=False, hash=False, repr=True)
    """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 `builtins.True`.
    """

    is_mentionable: bool = attr.field(eq=False, hash=False, repr=False)
    """Whether this role can be mentioned by all regardless of permissions."""


@attr_extensions.with_copy
@attr.define(hash=True, kw_only=True, weakref_slot=False)
class TemplateGuild(guilds.PartialGuild):
    """The partial guild object attached to `Template`."""

    description: typing.Optional[str] = attr.field(eq=False, hash=False, repr=False)
    """The guild's description, if set."""

    verification_level: typing.Union[guilds.GuildVerificationLevel, int] = attr.field(eq=False, hash=False, repr=False)
    """The verification level needed for a user to participate in this guild."""

    default_message_notifications: typing.Union[guilds.GuildMessageNotificationsLevel, int] = attr.field(
        eq=False, hash=False, repr=False
    )
    """The default setting for message notifications in this guild."""

    explicit_content_filter: typing.Union[guilds.GuildExplicitContentFilterLevel, int] = attr.field(
        eq=False, hash=False, repr=False
    )
    """The setting for the explicit content filter in this guild."""

    preferred_locale: typing.Union[str, locales.Locale] = attr.field(eq=False, hash=False, repr=False)
    """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`.
    """

    afk_timeout: datetime.timedelta = attr.field(eq=False, hash=False, repr=False)
    """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`).
    """

    roles: typing.Mapping[snowflakes.Snowflake, TemplateRole] = attr.field(eq=False, hash=False, repr=False)
    """The roles in the guild.

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

    channels: typing.Mapping[snowflakes.Snowflake, channels_.GuildChannel] = attr.field(
        eq=False, hash=False, repr=False
    )
    """The channels for the guild.

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

    afk_channel_id: typing.Optional[snowflakes.Snowflake] = attr.field(eq=False, hash=False, repr=False)
    """The ID for the channel that AFK voice users get sent to.

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

    system_channel_id: typing.Optional[snowflakes.Snowflake] = attr.field(eq=False, hash=False, repr=False)
    """The ID of the system channel or `builtins.None` if it is not enabled.

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

    system_channel_flags: guilds.GuildSystemChannelFlag = attr.field(eq=False, hash=False, repr=False)
    """Return flags for the guild system channel.

    These are used to describe which notifications are suppressed.
    """


@attr_extensions.with_copy
@attr.define(hash=True, kw_only=True, weakref_slot=False)
class Template:
    """Represents a template used for creating guilds."""

    code: str = attr.field(hash=True, repr=True)
    """The template's unique ID."""

    name: str = attr.field(eq=False, hash=False, repr=True)
    """The template's name."""

    description: typing.Optional[str] = attr.field(eq=False, hash=False, repr=False)
    """The template's description."""

    usage_count: int = attr.field(eq=False, hash=False, repr=True)
    """The number of times the template has been used to create a guild."""

    creator: users.User = attr.field(eq=False, hash=False, repr=False)
    """The user who created the template."""

    created_at: datetime.datetime = attr.field(eq=False, hash=False, repr=True)
    """When the template was created."""

    updated_at: datetime.datetime = attr.field(eq=False, hash=False, repr=True)
    """When the template was last synced with the source guild."""

    source_guild: TemplateGuild = attr.field(eq=False, hash=False, repr=True)
    """The partial object of the guild this template is based on."""

    is_unsynced: bool = attr.field(eq=False, hash=False, repr=False)
    """Whether this template is missing changes from it's source guild."""

    def __str__(self) -> str:
        return f"https://discord.new/{self.code}"

Classes

dataclass Template

class Template (
    *,
    code: str,
    name: str,
    description: Optional[str],
    usage_count: int,
    creator: users.User,
    created_at: datetime.datetime,
    updated_at: datetime.datetime,
    source_guild: TemplateGuild,
    is_unsynced: bool,
): ...

Represents a template used for creating guilds.

Method generated by attrs for class Template.

Expand source code
Browse git
class Template:
    """Represents a template used for creating guilds."""

    code: str = attr.field(hash=True, repr=True)
    """The template's unique ID."""

    name: str = attr.field(eq=False, hash=False, repr=True)
    """The template's name."""

    description: typing.Optional[str] = attr.field(eq=False, hash=False, repr=False)
    """The template's description."""

    usage_count: int = attr.field(eq=False, hash=False, repr=True)
    """The number of times the template has been used to create a guild."""

    creator: users.User = attr.field(eq=False, hash=False, repr=False)
    """The user who created the template."""

    created_at: datetime.datetime = attr.field(eq=False, hash=False, repr=True)
    """When the template was created."""

    updated_at: datetime.datetime = attr.field(eq=False, hash=False, repr=True)
    """When the template was last synced with the source guild."""

    source_guild: TemplateGuild = attr.field(eq=False, hash=False, repr=True)
    """The partial object of the guild this template is based on."""

    is_unsynced: bool = attr.field(eq=False, hash=False, repr=False)
    """Whether this template is missing changes from it's source guild."""

    def __str__(self) -> str:
        return f"https://discord.new/{self.code}"
Variables and properties
property codestr

The template's unique ID.

property created_atdatetime.datetime

When the template was created.

property creatorusers.User

The user who created the template.

property descriptionOptional[str]

The template's description.

property is_unsyncedbool

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

property namestr

The template's name.

property source_guildTemplateGuild

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

property updated_atdatetime.datetime

When the template was last synced with the source guild.

property usage_countint

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

dataclass TemplateGuild

class TemplateGuild (
    *,
    app: traits.RESTAware,
    id: snowflakes.Snowflake,
    icon_hash: Optional[str],
    name: str,
    description: Optional[str],
    verification_level: Union[guilds.GuildVerificationLevelint],
    default_message_notifications: Union[guilds.GuildMessageNotificationsLevelint],
    explicit_content_filter: Union[guilds.GuildExplicitContentFilterLevelint],
    preferred_locale: Union[strlocales.Locale],
    afk_timeout: datetime.timedelta,
    roles: Mapping[snowflakes.SnowflakeTemplateRole],
    channels: Mapping[snowflakes.Snowflakechannels_.GuildChannel],
    afk_channel_id: Optional[snowflakes.Snowflake],
    system_channel_id: Optional[snowflakes.Snowflake],
    system_channel_flags: guilds.GuildSystemChannelFlag,
): ...

The partial guild object attached to Template.

Method generated by attrs for class TemplateGuild.

Expand source code
Browse git
class TemplateGuild(guilds.PartialGuild):
    """The partial guild object attached to `Template`."""

    description: typing.Optional[str] = attr.field(eq=False, hash=False, repr=False)
    """The guild's description, if set."""

    verification_level: typing.Union[guilds.GuildVerificationLevel, int] = attr.field(eq=False, hash=False, repr=False)
    """The verification level needed for a user to participate in this guild."""

    default_message_notifications: typing.Union[guilds.GuildMessageNotificationsLevel, int] = attr.field(
        eq=False, hash=False, repr=False
    )
    """The default setting for message notifications in this guild."""

    explicit_content_filter: typing.Union[guilds.GuildExplicitContentFilterLevel, int] = attr.field(
        eq=False, hash=False, repr=False
    )
    """The setting for the explicit content filter in this guild."""

    preferred_locale: typing.Union[str, locales.Locale] = attr.field(eq=False, hash=False, repr=False)
    """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`.
    """

    afk_timeout: datetime.timedelta = attr.field(eq=False, hash=False, repr=False)
    """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`).
    """

    roles: typing.Mapping[snowflakes.Snowflake, TemplateRole] = attr.field(eq=False, hash=False, repr=False)
    """The roles in the guild.

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

    channels: typing.Mapping[snowflakes.Snowflake, channels_.GuildChannel] = attr.field(
        eq=False, hash=False, repr=False
    )
    """The channels for the guild.

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

    afk_channel_id: typing.Optional[snowflakes.Snowflake] = attr.field(eq=False, hash=False, repr=False)
    """The ID for the channel that AFK voice users get sent to.

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

    system_channel_id: typing.Optional[snowflakes.Snowflake] = attr.field(eq=False, hash=False, repr=False)
    """The ID of the system channel or `builtins.None` if it is not enabled.

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

    system_channel_flags: guilds.GuildSystemChannelFlag = attr.field(eq=False, hash=False, repr=False)
    """Return flags for the guild system channel.

    These are used to describe which notifications are suppressed.
    """
Method resolution order
dataclass TemplateGuild
That's this class!
dataclass PartialGuild

Base object for any partial guild objects …

abstract class Unique

Mixin for a class that enforces uniqueness by a snowflake ID.

extern class abc.ABC

Helper class that provides a standard way to create an ABC using inheritance.

Variables and properties
property afk_channel_idOptional[snowflakes.Snowflake]

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

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

property afk_timeoutdatetime.timedelta

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).

property app : traits.RESTAware

The client application that models may use for procedures.

property channelsMapping[snowflakes.Snowflake, channels_.GuildChannel]

The channels for the guild.

Note

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

property created_atdatetime.datetime

When the object was created.

property default_message_notificationsUnion[guilds.GuildMessageNotificationsLevel, int]

The default setting for message notifications in this guild.

property descriptionOptional[str]

The guild's description, if set.

property explicit_content_filterUnion[guilds.GuildExplicitContentFilterLevel, int]

The setting for the explicit content filter in this guild.

property icon_hashOptional[str]

The hash for the guild icon, if there is one.

property icon_urlOptional[files.URL]

Icon URL for the guild, if set; otherwise None.

property idsnowflakes.Snowflake

The ID of this entity.

property namestr

The name of the guild.

property preferred_localeUnion[str, locales.Locale]

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.

property rolesMapping[snowflakes.Snowflake, TemplateRole]

The roles in the guild.

Note

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

property shard_id : Optional[int]

Return the ID of the shard this guild is served by.

This may return None if the application does not have a gateway connection.

property system_channel_flagsguilds.GuildSystemChannelFlag

Return flags for the guild system channel.

These are used to describe which notifications are suppressed.

property system_channel_idOptional[snowflakes.Snowflake]

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.

property verification_levelUnion[guilds.GuildVerificationLevel, int]

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

Methods
async def ban(
    user: snowflakes.SnowflakeishOr[users.PartialUser],
    *,
    delete_message_days: undefined.UndefinedOr[int] = UNDEFINED,
    reason: undefined.UndefinedOr[str] = UNDEFINED,
) -> None: ...

Inherited from: PartialGuild.ban

Ban the given user from this guild.

Parameters

user : Snowflakeish[PartialUser]
The user to ban from the guild

Other Parameters

delete_message_days : UndefinedNoneOr[int]
If provided, the number of days to delete messages for. This must be between 0 and 7.
reason : UndefinedOr[str]
If provided, the reason that will be recorded in the audit logs. Maximum of 512 characters.

Raises

BadRequestError
If any of the fields that are passed have an invalid value.
ForbiddenError
If you are missing the BAN_MEMBERS permission.
UnauthorizedError
If you are unauthorized to make the request (invalid/missing token).
NotFoundError
If the guild or user are not found.
RateLimitTooLongError
Raised in the event that a rate limit occurs that is longer than max_rate_limit when making a request.
RateLimitedError
Usually, Hikari will handle and retry on hitting rate-limits automatically. This includes most bucket-specific rate-limits and global rate-limits. In some rare edge cases, however, Discord implements other undocumented rules for rate-limiting, such as limits per attribute. These cannot be detected or handled normally by Hikari due to their undocumented nature, and will trigger this exception if they occur.
InternalServerError
If an internal error occurs on Discord while handling the request.
async def create_category(
    name: str,
    *,
    position: undefined.UndefinedOr[int] = UNDEFINED,
    permission_overwrites: undefined.UndefinedOr[Sequence[channels_.PermissionOverwrite]] = UNDEFINED,
    reason: undefined.UndefinedOr[str] = UNDEFINED,
) -> GuildCategory: ...

Inherited from: PartialGuild.create_category

Create a category in the guild.

Parameters

name : str
The channels name. Must be between 2 and 1000 characters.

Other Parameters

position : UndefinedOr[int]
If provided, the position of the category.
permission_overwrites : UndefinedOr[Sequence[PermissionOverwrite]]
If provided, the permission overwrites for the category.
reason : UndefinedOr[str]
If provided, the reason that will be recorded in the audit logs. Maximum of 512 characters.

Returns

GuildCategory
The created category.

Raises

BadRequestError
If any of the fields that are passed have an invalid value.
ForbiddenError
If you are missing the MANAGE_CHANNEL permission.
UnauthorizedError
If you are unauthorized to make the request (invalid/missing token).
NotFoundError
If the guild is not found.
RateLimitTooLongError
Raised in the event that a rate limit occurs that is longer than max_rate_limit when making a request.
RateLimitedError
Usually, Hikari will handle and retry on hitting rate-limits automatically. This includes most bucket-specific rate-limits and global rate-limits. In some rare edge cases, however, Discord implements other undocumented rules for rate-limiting, such as limits per attribute. These cannot be detected or handled normally by Hikari due to their undocumented nature, and will trigger this exception if they occur.
InternalServerError
If an internal error occurs on Discord while handling the request.
async def create_news_channel(
    name: str,
    *,
    position: undefined.UndefinedOr[int] = UNDEFINED,
    topic: undefined.UndefinedOr[str] = UNDEFINED,
    nsfw: undefined.UndefinedOr[bool] = UNDEFINED,
    rate_limit_per_user: undefined.UndefinedOr[time.Intervalish] = UNDEFINED,
    permission_overwrites: undefined.UndefinedOr[Sequence[channels_.PermissionOverwrite]] = UNDEFINED,
    category: undefined.UndefinedOr[snowflakes.SnowflakeishOr[channels_.GuildCategory]] = UNDEFINED,
    reason: undefined.UndefinedOr[str] = UNDEFINED,
) -> GuildNewsChannel: ...

Inherited from: PartialGuild.create_news_channel

Create a news channel in the guild.

Parameters

name : str
The channels name. Must be between 2 and 1000 characters.

Other Parameters

position : UndefinedOr[int]
If provided, the position of the channel (relative to the category, if any).
topic : UndefinedOr[str]
If provided, the channels topic. Maximum 1024 characters.
nsfw : UndefinedOr[bool]
If provided, whether to mark the channel as NSFW.
rate_limit_per_user : UndefinedOr[Intervalish]
If provided, the amount of seconds a user has to wait before being able to send another message in the channel. Maximum 21600 seconds.
permission_overwrites : UndefinedOr[Sequence[PermissionOverwrite]]
If provided, the permission overwrites for the channel.
category : UndefinedOr[SnowflakeishOr[GuildCategory]]
The category to create the channel under. This may be the object or the ID of an existing category.
reason : UndefinedOr[str]
If provided, the reason that will be recorded in the audit logs. Maximum of 512 characters.

Returns

GuildNewsChannel
The created channel.

Raises

BadRequestError
If any of the fields that are passed have an invalid value.
ForbiddenError
If you are missing the MANAGE_CHANNEL permission.
UnauthorizedError
If you are unauthorized to make the request (invalid/missing token).
NotFoundError
If the guild is not found.
RateLimitTooLongError
Raised in the event that a rate limit occurs that is longer than max_rate_limit when making a request.
RateLimitedError
Usually, Hikari will handle and retry on hitting rate-limits automatically. This includes most bucket-specific rate-limits and global rate-limits. In some rare edge cases, however, Discord implements other undocumented rules for rate-limiting, such as limits per attribute. These cannot be detected or handled normally by Hikari due to their undocumented nature, and will trigger this exception if they occur.
InternalServerError
If an internal error occurs on Discord while handling the request.
async def create_stage_channel(
    name: str,
    *,
    position: undefined.UndefinedOr[int] = UNDEFINED,
    user_limit: undefined.UndefinedOr[int] = UNDEFINED,
    bitrate: undefined.UndefinedOr[int] = UNDEFINED,
    permission_overwrites: undefined.UndefinedOr[Sequence[channels_.PermissionOverwrite]] = UNDEFINED,
    region: undefined.UndefinedOr[Union[voices_.VoiceRegion, str]] = UNDEFINED,
    category: undefined.UndefinedOr[snowflakes.SnowflakeishOr[channels_.GuildCategory]] = UNDEFINED,
    reason: undefined.UndefinedOr[str] = UNDEFINED,
) -> channels_.GuildStageChannel: ...

Inherited from: PartialGuild.create_stage_channel

Create a stage channel in the guild.

Parameters

name : str
The channel's name. Must be between 2 and 1000 characters.

Other Parameters

position : UndefinedOr[int]
If provided, the position of the channel (relative to the category, if any).
user_limit : UndefinedOr[int]
If provided, the maximum users in the channel at once. Must be between 0 and 99 with 0 meaning no limit.
bitrate : UndefinedOr[int]
If provided, the bitrate for the channel. Must be between 8000 and 96000 or 8000 and 128000 for VIP servers.
permission_overwrites : UndefinedOr[Sequence[PermissionOverwrite]]
If provided, the permission overwrites for the channel.
region : UndefinedOr[Union[VoiceRegion, str]]
If provided, the voice region to for this channel. Passing None here will set it to "auto" mode where the used region will be decided based on the first person who connects to it when it's empty.
category : UndefinedOr[SnowflakeishOr[GuildCategory]]
The category to create the channel under. This may be the object or the ID of an existing category.
reason : UndefinedOr[str]
If provided, the reason that will be recorded in the audit logs. Maximum of 512 characters.

Returns

GuildStageChannel
The created channel.

Raises

BadRequestError
If any of the fields that are passed have an invalid value.
ForbiddenError
If you are missing the MANAGE_CHANNEL permission.
UnauthorizedError
If you are unauthorized to make the request (invalid/missing token).
NotFoundError
If the guild is not found.
RateLimitTooLongError
Raised in the event that a rate limit occurs that is longer than max_rate_limit when making a request.
RateLimitedError
Usually, Hikari will handle and retry on hitting rate-limits automatically. This includes most bucket-specific rate-limits and global rate-limits. In some rare edge cases, however, Discord implements other undocumented rules for rate-limiting, such as limits per attribute. These cannot be detected or handled normally by Hikari due to their undocumented nature, and will trigger this exception if they occur.
InternalServerError
If an internal error occurs on Discord while handling the request.
async def create_sticker(
    name: str,
    tag: str,
    image: files.Resourceish,
    *,
    description: undefined.UndefinedOr[str] = UNDEFINED,
    reason: undefined.UndefinedOr[str] = UNDEFINED,
) -> stickers.GuildSticker: ...

Inherited from: PartialGuild.create_sticker

Create a sticker in a guild.

Parameters

name : str
The name for the sticker.
tag : str
The tag for the sticker.
image : Resourceish

The 320x320 image for the sticker. Maximum upload size is 500kb. This can be a still or an animated PNG or a Lottie.

Note

Lottie support is only available for verified and partnered servers.

Other Parameters

description : UndefinedOr[str]
If provided, the description of the sticker.
reason : UndefinedOr[str]
If provided, the reason that will be recorded in the audit logs. Maximum of 512 characters.

Returns

GuildSticker
The created sticker.

Raises

BadRequestError
If any of the fields that are passed have an invalid value or if there are no more spaces for the sticker in the guild.
ForbiddenError
If you are missing MANAGE_EMOJIS_AND_STICKERS in the server.
NotFoundError
If the guild is not found.
UnauthorizedError
If you are unauthorized to make the request (invalid/missing token).
RateLimitTooLongError
Raised in the event that a rate limit occurs that is longer than max_rate_limit when making a request.
RateLimitedError
Usually, Hikari will handle and retry on hitting rate-limits automatically. This includes most bucket-specific rate-limits and global rate-limits. In some rare edge cases, however, Discord implements other undocumented rules for rate-limiting, such as limits per attribute. These cannot be detected or handled normally by Hikari due to their undocumented nature, and will trigger this exception if they occur.
InternalServerError
If an internal error occurs on Discord while handling the request.
async def create_text_channel(
    name: str,
    *,
    position: undefined.UndefinedOr[int] = UNDEFINED,
    topic: undefined.UndefinedOr[str] = UNDEFINED,
    nsfw: undefined.UndefinedOr[bool] = UNDEFINED,
    rate_limit_per_user: undefined.UndefinedOr[time.Intervalish] = UNDEFINED,
    permission_overwrites: undefined.UndefinedOr[Sequence[channels_.PermissionOverwrite]] = UNDEFINED,
    category: undefined.UndefinedOr[snowflakes.SnowflakeishOr[channels_.GuildCategory]] = UNDEFINED,
    reason: undefined.UndefinedOr[str] = UNDEFINED,
) -> GuildTextChannel: ...

Inherited from: PartialGuild.create_text_channel

Create a text channel in the guild.

Parameters

name : str
The channels name. Must be between 2 and 1000 characters.

Other Parameters

position : UndefinedOr[int]
If provided, the position of the channel (relative to the category, if any).
topic : UndefinedOr[str]
If provided, the channels topic. Maximum 1024 characters.
nsfw : UndefinedOr[bool]
If provided, whether to mark the channel as NSFW.
rate_limit_per_user : UndefinedOr[Intervalish]
If provided, the amount of seconds a user has to wait before being able to send another message in the channel. Maximum 21600 seconds.
permission_overwrites : UndefinedOr[Sequence[PermissionOverwrite]]
If provided, the permission overwrites for the channel.
category : UndefinedOr[SnowflakeishOr[GuildCategory]]
The category to create the channel under. This may be the object or the ID of an existing category.
reason : UndefinedOr[str]
If provided, the reason that will be recorded in the audit logs. Maximum of 512 characters.

Returns

GuildTextChannel
The created channel.

Raises

BadRequestError
If any of the fields that are passed have an invalid value.
ForbiddenError
If you are missing the MANAGE_CHANNEL permission.
UnauthorizedError
If you are unauthorized to make the request (invalid/missing token).
NotFoundError
If the guild is not found.
RateLimitTooLongError
Raised in the event that a rate limit occurs that is longer than max_rate_limit when making a request.
RateLimitedError
Usually, Hikari will handle and retry on hitting rate-limits automatically. This includes most bucket-specific rate-limits and global rate-limits. In some rare edge cases, however, Discord implements other undocumented rules for rate-limiting, such as limits per attribute. These cannot be detected or handled normally by Hikari due to their undocumented nature, and will trigger this exception if they occur.
InternalServerError
If an internal error occurs on Discord while handling the request.
async def create_voice_channel(
    name: str,
    *,
    position: undefined.UndefinedOr[int] = UNDEFINED,
    user_limit: undefined.UndefinedOr[int] = UNDEFINED,
    bitrate: undefined.UndefinedOr[int] = UNDEFINED,
    video_quality_mode: undefined.UndefinedOr[Union[channels_.VideoQualityModeint]] = UNDEFINED,
    permission_overwrites: undefined.UndefinedOr[Sequence[channels_.PermissionOverwrite]] = UNDEFINED,
    region: undefined.UndefinedOr[Union[voices_.VoiceRegion, str]] = UNDEFINED,
    category: undefined.UndefinedOr[snowflakes.SnowflakeishOr[channels_.GuildCategory]] = UNDEFINED,
    reason: undefined.UndefinedOr[str] = UNDEFINED,
) -> channels_.GuildVoiceChannel: ...

Inherited from: PartialGuild.create_voice_channel

Create a voice channel in a guild.

Parameters

guild : SnowflakeishOr[PartialGuild]
The guild to create the channel in. This may be the object or the ID of an existing guild.
name : str
The channels name. Must be between 2 and 1000 characters.

Other Parameters

position : UndefinedOr[int]
If provided, the position of the channel (relative to the category, if any).
user_limit : UndefinedOr[int]
If provided, the maximum users in the channel at once. Must be between 0 and 99 with 0 meaning no limit.
bitrate : UndefinedOr[int]
If provided, the bitrate for the channel. Must be between 8000 and 96000 or 8000 and 128000 for VIP servers.
video_quality_mode : UndefinedOr[Union[VideoQualityMode, int]]
If provided, the new video quality mode for the channel.
permission_overwrites : UndefinedOr[Sequence[PermissionOverwrite]]
If provided, the permission overwrites for the channel.
region : UndefinedOr[Union[VoiceRegion, str]]
If provided, the voice region to for this channel. Passing None here will set it to "auto" mode where the used region will be decided based on the first person who connects to it when it's empty.
category : UndefinedOr[SnowflakeishOr[GuildCategory]]
The category to create the channel under. This may be the object or the ID of an existing category.
reason : UndefinedOr[str]
If provided, the reason that will be recorded in the audit logs. Maximum of 512 characters.

Returns

GuildVoiceChannel
The created channel.

Raises

BadRequestError
If any of the fields that are passed have an invalid value.
ForbiddenError
If you are missing the MANAGE_CHANNEL permission.
UnauthorizedError
If you are unauthorized to make the request (invalid/missing token).
NotFoundError
If the gui ld is not found.
RateLimitTooLongError
Raised in the event that a rate limit occurs that is longer than max_rate_limit when making a request.
RateLimitedError
Usually, Hikari will handle and retry on hitting rate-limits automatically. This includes most bucket-specific rate-limits and global rate-limits. In some rare edge cases, however, Discord implements other undocumented rules for rate-limiting, such as limits per attribute. These cannot be detected or handled normally by Hikari due to their undocumented nature, and will trigger this exception if they occur.
InternalServerError
If an internal error occurs on Discord while handling the request.
async def delete_channel(
    channel: snowflakes.SnowflakeishOr[channels_.GuildChannel],
) -> GuildChannel: ...

Inherited from: PartialGuild.delete_channel

Delete a channel in the guild.

Note

This method can also be used for deleting guild categories as well.

Parameters

channel : SnowflakeishOr[GuildChannel]
The channel or category to delete. This may be the object or the ID of an existing channel.

Returns

GuildChannel
Object of the channel or category that was deleted.

Raises

hikari.errors.UnauthorizedError, or close a DM.
If you are unauthorized to make the request (invalid/missing token).
ForbiddenError
If you are missing the MANAGE_CHANNEL permission in the channel.
NotFoundError
If the channel is not found.
RateLimitTooLongError
Raised in the event that a rate limit occurs that is longer than max_rate_limit when making a request.
RateLimitedError
Usually, Hikari will handle and retry on hitting rate-limits automatically. This includes most bucket-specific rate-limits and global rate-limits. In some rare edge cases, however, Discord implements other undocumented rules for rate-limiting, such as limits per attribute. These cannot be detected or handled normally by Hikari due to their undocumented nature, and will trigger this exception if they occur.
InternalServerError
If an internal error occurs on Discord while handling the request.

Note

For Public servers, the set 'Rules' or 'Guidelines' channels and the 'Public Server Updates' channel cannot be deleted.

async def delete_sticker(
    sticker: snowflakes.SnowflakeishOr[stickers.PartialSticker],
    *,
    reason: undefined.UndefinedOr[str] = UNDEFINED,
) -> None: ...

Inherited from: PartialGuild.delete_sticker

Delete a sticker in a guild.

Parameters

sticker : SnowflakeishOr[PartialSticker]
The sticker to delete. This can be a sticker object or the ID of an existing sticker.

Other Parameters

reason : UndefinedOr[str]
If provided, the reason that will be recorded in the audit logs. Maximum of 512 characters.

Raises

ForbiddenError
If you are missing MANAGE_EMOJIS_AND_STICKERS in the server.
NotFoundError
If the guild or the sticker are not found.
UnauthorizedError
If you are unauthorized to make the request (invalid/missing token).
RateLimitTooLongError
Raised in the event that a rate limit occurs that is longer than max_rate_limit when making a request.
RateLimitedError
Usually, Hikari will handle and retry on hitting rate-limits automatically. This includes most bucket-specific rate-limits and global rate-limits. In some rare edge cases, however, Discord implements other undocumented rules for rate-limiting, such as limits per attribute. These cannot be detected or handled normally by Hikari due to their undocumented nature, and will trigger this exception if they occur.
InternalServerError
If an internal error occurs on Discord while handling the request.
async def edit(
    *,
    name: undefined.UndefinedOr[str] = UNDEFINED,
    verification_level: undefined.UndefinedOr[GuildVerificationLevel] = UNDEFINED,
    default_message_notifications: undefined.UndefinedOr[GuildMessageNotificationsLevel] = UNDEFINED,
    explicit_content_filter_level: undefined.UndefinedOr[GuildExplicitContentFilterLevel] = UNDEFINED,
    afk_channel: undefined.UndefinedOr[snowflakes.SnowflakeishOr[channels_.GuildVoiceChannel]] = UNDEFINED,
    afk_timeout: undefined.UndefinedOr[time.Intervalish] = UNDEFINED,
    icon: undefined.UndefinedNoneOr[files.Resourceish] = UNDEFINED,
    owner: undefined.UndefinedOr[snowflakes.SnowflakeishOr[users.PartialUser]] = UNDEFINED,
    splash: undefined.UndefinedNoneOr[files.Resourceish] = UNDEFINED,
    banner: undefined.UndefinedNoneOr[files.Resourceish] = UNDEFINED,
    system_channel: undefined.UndefinedNoneOr[snowflakes.SnowflakeishOr[channels_.GuildTextChannel]] = UNDEFINED,
    rules_channel: undefined.UndefinedNoneOr[snowflakes.SnowflakeishOr[channels_.GuildTextChannel]] = UNDEFINED,
    public_updates_channel: undefined.UndefinedNoneOr[snowflakes.SnowflakeishOr[channels_.GuildTextChannel]] = UNDEFINED,
    preferred_locale: undefined.UndefinedOr[Union[strlocales.Locale]] = UNDEFINED,
    reason: undefined.UndefinedOr[str] = UNDEFINED,
) -> RESTGuild: ...

Inherited from: PartialGuild.edit

Edits the guild.

Parameters

name : UndefinedOr[str]
If provided, the new name for the guild.
verification_level : UndefinedOr[GuildVerificationLevel]
If provided, the new verification level.
default_message_notifications : UndefinedOr[GuildMessageNotificationsLevel]
If provided, the new default message notifications level.
explicit_content_filter_level : UndefinedOr[GuildExplicitContentFilterLevel]
If provided, the new explicit content filter level.
afk_channel : UndefinedOr[SnowflakeishOr[GuildVoiceChannel]]
If provided, the new afk channel. Requires afk_timeout to be set to work.
afk_timeout : UndefinedOr[Intervalish]
If provided, the new afk timeout.
icon : UndefinedOr[Resourceish]
If provided, the new guild icon. Must be a 1024x1024 image or can be an animated gif when the guild has the ANIMATED_ICON feature.
owner : UndefinedOr[SnowflakeishOr[PartialUser]]]

If provided, the new guild owner.

Warning

You need to be the owner of the server to use this.

splash : UndefinedNoneOr[Resourceish]
If provided, the new guild splash. Must be a 16:9 image and the guild must have the INVITE_SPLASH feature.
banner : UndefinedNoneOr[Resourceish]
If provided, the new guild banner. Must be a 16:9 image and the guild must have the BANNER feature.
system_channel : UndefinedNoneOr[SnowflakeishOr[GuildTextChannel]]
If provided, the new system channel.
rules_channel : UndefinedNoneOr[SnowflakeishOr[GuildTextChannel]]
If provided, the new rules channel.
public_updates_channel : UndefinedNoneOr[SnowflakeishOr[GuildTextChannel]]
If provided, the new public updates channel.
preferred_locale : UndefinedNoneOr[str]
If provided, the new preferred locale.
reason : UndefinedOr[str]
If provided, the reason that will be recorded in the audit logs. Maximum of 512 characters.

Returns

RESTGuild
The edited guild.

Raises

BadRequestError
If any of the fields that are passed have an invalid value. Or you are missing the
ForbiddenError
If you are missing the MANAGE_GUILD permission or if you tried to pass ownership without being the server owner.
UnauthorizedError
If you are unauthorized to make the request (invalid/missing token).
NotFoundError
If the guild is not found.
RateLimitTooLongError
Raised in the event that a rate limit occurs that is longer than max_rate_limit when making a request.
RateLimitedError
Usually, Hikari will handle and retry on hitting rate-limits automatically. This includes most bucket-specific rate-limits and global rate-limits. In some rare edge cases, however, Discord implements other undocumented rules for rate-limiting, such as limits per attribute. These cannot be detected or handled normally by Hikari due to their undocumented nature, and will trigger this exception if they occur.
InternalServerError
If an internal error occurs on Discord while handling the request.
async def edit_sticker(
    sticker: snowflakes.SnowflakeishOr[stickers.PartialSticker],
    *,
    name: undefined.UndefinedOr[str] = UNDEFINED,
    description: undefined.UndefinedOr[str] = UNDEFINED,
    tag: undefined.UndefinedOr[str] = UNDEFINED,
    reason: undefined.UndefinedOr[str] = UNDEFINED,
) -> GuildSticker: ...

Inherited from: PartialGuild.edit_sticker

Edit a sticker in a guild.

Parameters

sticker : SnowflakeishOr[PartialSticker]
The sticker to edit. This can be a sticker object or the ID of an existing sticker.

Other Parameters

name : UndefinedOr[str]
If provided, the new name for the sticker.
description : UndefinedOr[str]
If provided, the new description for the sticker.
tag : UndefinedOr[str]
If provided, the new sticker tag.
reason : UndefinedOr[str]
If provided, the reason that will be recorded in the audit logs. Maximum of 512 characters.

Returns

GuildSticker
The edited sticker.

Raises

BadRequestError
If any of the fields that are passed have an invalid value.
ForbiddenError
If you are missing MANAGE_EMOJIS_AND_STICKERS in the server.
NotFoundError
If the guild or the sticker are not found.
UnauthorizedError
If you are unauthorized to make the request (invalid/missing token).
RateLimitTooLongError
Raised in the event that a rate limit occurs that is longer than max_rate_limit when making a request.
RateLimitedError
Usually, Hikari will handle and retry on hitting rate-limits automatically. This includes most bucket-specific rate-limits and global rate-limits. In some rare edge cases, however, Discord implements other undocumented rules for rate-limiting, such as limits per attribute. These cannot be detected or handled normally by Hikari due to their undocumented nature, and will trigger this exception if they occur.
InternalServerError
If an internal error occurs on Discord while handling the request.
async def fetch_emoji(
    emoji: snowflakes.SnowflakeishOr[emojis_.CustomEmoji],
) -> emojis_.KnownCustomEmoji: ...

Inherited from: PartialGuild.fetch_emoji

Fetch an emoji from the guild.

Parameters

emoji : SnowflakeishOr[CustomEmoji]
The emoji to fetch. This can be a CustomEmoji or the ID of an existing emoji.

Returns

KnownCustomEmoji
The requested emoji.

Raises

NotFoundError
If the guild or the emoji are not found.
UnauthorizedError
If you are unauthorized to make the request (invalid/missing token).
RateLimitTooLongError
Raised in the event that a rate limit occurs that is longer than max_rate_limit when making a request.
RateLimitedError
Usually, Hikari will handle and retry on hitting rate-limits automatically. This includes most bucket-specific rate-limits and global rate-limits. In some rare edge cases, however, Discord implements other undocumented rules for rate-limiting, such as limits per attribute. These cannot be detected or handled normally by Hikari due to their undocumented nature, and will trigger this exception if they occur.
InternalServerError
If an internal error occurs on Discord while handling the request.
async def fetch_emojis() -> Sequence[emojis_.KnownCustomEmoji]: ...

Inherited from: PartialGuild.fetch_emojis

Fetch the emojis of the guild.

Returns

Sequence[KnownCustomEmoji]
The requested emojis.

Raises

NotFoundError
If the guild is not found.
UnauthorizedError
If you are unauthorized to make the request (invalid/missing token).
RateLimitTooLongError
Raised in the event that a rate limit occurs that is longer than max_rate_limit when making a request.
RateLimitedError
Usually, Hikari will handle and retry on hitting rate-limits automatically. This includes most bucket-specific rate-limits and global rate-limits. In some rare edge cases, however, Discord implements other undocumented rules for rate-limiting, such as limits per attribute. These cannot be detected or handled normally by Hikari due to their undocumented nature, and will trigger this exception if they occur.
InternalServerError
If an internal error occurs on Discord while handling the request.
async def fetch_roles() -> Sequence[Role]: ...

Inherited from: PartialGuild.fetch_roles

Fetch the roles of the guild.

Returns

Sequence[Role]
The requested roles.

Raises

UnauthorizedError
If you are unauthorized to make the request (invalid/missing token). hikari.errors.NotFoundError If the guild is not found.
RateLimitTooLongError
Raised in the event that a rate limit occurs that is longer than max_rate_limit when making a request.
RateLimitedError
Usually, Hikari will handle and retry on hitting rate-limits automatically. This includes most bucket-specific rate-limits and global rate-limits. In some rare edge cases, however, Discord implements other undocumented rules for rate-limiting, such as limits per attribute. These cannot be detected or handled normally by Hikari due to their undocumented nature, and will trigger this exception if they occur.
InternalServerError
If an internal error occurs on Discord while handling the request.
async def fetch_self() -> RESTGuild: ...

Inherited from: PartialGuild.fetch_self

Fetch the guild.

Returns

RESTGuild
The requested guild.

Raises

ForbiddenError
If you are not part of the guild.
NotFoundError
If the guild is not found.
UnauthorizedError
If you are unauthorized to make the request (invalid/missing token).
RateLimitTooLongError
Raised in the event that a rate limit occurs that is longer than max_rate_limit when making a request.
RateLimitedError
Usually, Hikari will handle and retry on hitting rate-limits automatically. This includes most bucket-specific rate-limits and global rate-limits. In some rare edge cases, however, Discord implements other undocumented rules for rate-limiting, such as limits per attribute. These cannot be detected or handled normally by Hikari due to their undocumented nature, and will trigger this exception if they occur.
InternalServerError
If an internal error occurs on Discord while handling the request.
async def fetch_sticker(
    sticker: snowflakes.SnowflakeishOr[stickers.PartialSticker],
) -> GuildSticker: ...

Inherited from: PartialGuild.fetch_sticker

Fetch a sticker from the guild.

Parameters

sticker : snowflakes.SnowflakeishOr[PartialSticker]
The sticker to fetch. This can be a sticker object or the ID of an existing sticker.

Returns

GuildSticker
The requested sticker.

Raises

ForbiddenError
If you are not part of the server.
NotFoundError
If the guild or the sticker are not found.
UnauthorizedError
If you are unauthorized to make the request (invalid/missing token).
RateLimitTooLongError
Raised in the event that a rate limit occurs that is longer than max_rate_limit when making a request.
RateLimitedError
Usually, Hikari will handle and retry on hitting rate-limits automatically. This includes most bucket-specific rate-limits and global rate-limits. In some rare edge cases, however, Discord implements other undocumented rules for rate-limiting, such as limits per attribute. These cannot be detected or handled normally by Hikari due to their undocumented nature, and will trigger this exception if they occur.
InternalServerError
If an internal error occurs on Discord while handling the request.
async def fetch_stickers() -> Sequence[GuildSticker]: ...

Inherited from: PartialGuild.fetch_stickers

Fetch the stickers of the guild.

Returns

Sequence[GuildSticker]
The requested stickers.

Raises

ForbiddenError
If you are not part of the server.
NotFoundError
If the guild is not found.
UnauthorizedError
If you are unauthorized to make the request (invalid/missing token).
RateLimitTooLongError
Raised in the event that a rate limit occurs that is longer than max_rate_limit when making a request.
RateLimitedError
Usually, Hikari will handle and retry on hitting rate-limits automatically. This includes most bucket-specific rate-limits and global rate-limits. In some rare edge cases, however, Discord implements other undocumented rules for rate-limiting, such as limits per attribute. These cannot be detected or handled normally by Hikari due to their undocumented nature, and will trigger this exception if they occur.
InternalServerError
If an internal error occurs on Discord while handling the request.
async def kick(
    user: snowflakes.SnowflakeishOr[users.PartialUser],
    *,
    reason: undefined.UndefinedOr[str] = UNDEFINED,
) -> None: ...

Inherited from: PartialGuild.kick

Kicks the given user from this guild.

Parameters

user : Snowflakeish[PartialUser]
The user to kick from the guild

Other Parameters

reason : UndefinedOr[str]
If provided, the reason that will be recorded in the audit logs. Maximum of 512 characters.

Raises

BadRequestError
If any of the fields that are passed have an invalid value.
ForbiddenError
If you are missing the KICK_MEMBERS permission.
UnauthorizedError
If you are unauthorized to make the request (invalid/missing token).
NotFoundError
If the guild or user are not found.
RateLimitTooLongError
Raised in the event that a rate limit occurs that is longer than max_rate_limit when making a request.
RateLimitedError
Usually, Hikari will handle and retry on hitting rate-limits automatically. This includes most bucket-specific rate-limits and global rate-limits. In some rare edge cases, however, Discord implements other undocumented rules for rate-limiting, such as limits per attribute. These cannot be detected or handled normally by Hikari due to their undocumented nature, and will trigger this exception if they occur.
InternalServerError
If an internal error occurs on Discord while handling the request.
def make_icon_url(
    *,
    ext: Optional[str] = None,
    size: int = 4096,
) -> Optional[files.URL]: ...

Inherited from: PartialGuild.make_icon_url

Generate the guild's icon URL, if set.

Parameters

ext : Optional[str]

The extension to use for this URL, defaults to png or gif. Supports png, jpeg, jpg, webp and gif (when animated).

If None, then the correct default extension is determined based on whether the icon is animated or not.

size : int
The size to set for the URL, defaults to 4096. Can be any power of two between 16 and 4096.

Returns

Optional[URL]
The URL to the resource, or None if no icon is set.

Raises

ValueError
If size is not a power of two or not between 16 and 4096.
async def unban(
    user: snowflakes.SnowflakeishOr[users.PartialUser],
    *,
    reason: undefined.UndefinedOr[str] = UNDEFINED,
) -> None: ...

Inherited from: PartialGuild.unban

Unban the given user from this guild.

Parameters

user : Snowflakeish[PartialUser]
The user to unban from the guild

Other Parameters

reason : UndefinedOr[str]
If provided, the reason that will be recorded in the audit logs. Maximum of 512 characters.

Raises

BadRequestError
If any of the fields that are passed have an invalid value.
ForbiddenError
If you are missing the BAN_MEMBERS permission.
UnauthorizedError
If you are unauthorized to make the request (invalid/missing token).
NotFoundError
If the guild or user are not found.
RateLimitTooLongError
Raised in the event that a rate limit occurs that is longer than max_rate_limit when making a request.
RateLimitedError
Usually, Hikari will handle and retry on hitting rate-limits automatically. This includes most bucket-specific rate-limits and global rate-limits. In some rare edge cases, however, Discord implements other undocumented rules for rate-limiting, such as limits per attribute. These cannot be detected or handled normally by Hikari due to their undocumented nature, and will trigger this exception if they occur.
InternalServerError
If an internal error occurs on Discord while handling the request.

dataclass TemplateRole

class TemplateRole (
    *,
    app: traits.RESTAware,
    id: snowflakes.Snowflake,
    name: str,
    permissions: permissions_.Permissions,
    color: colors.Color,
    is_hoisted: bool,
    is_mentionable: bool,
): ...

The partial role object attached to Template.

Method generated by attrs for class TemplateRole.

Expand source code
Browse git
class TemplateRole(guilds.PartialRole):
    """The partial role object attached to `Template`."""

    permissions: permissions_.Permissions = attr.field(eq=False, hash=False, repr=False)
    """The guild wide permissions this role gives to the members it's attached to,

    This may be overridden by channel overwrites.
    """

    color: colors.Color = attr.field(eq=False, hash=False, repr=True)
    """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 = attr.field(eq=False, hash=False, repr=True)
    """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 `builtins.True`.
    """

    is_mentionable: bool = attr.field(eq=False, hash=False, repr=False)
    """Whether this role can be mentioned by all regardless of permissions."""
Method resolution order
dataclass TemplateRole
That's this class!
dataclass PartialRole

Represents a partial guild bound Role object …

abstract class Unique

Mixin for a class that enforces uniqueness by a snowflake ID.

extern class abc.ABC

Helper class that provides a standard way to create an ABC using inheritance.

Variables and properties
property app : traits.RESTAware

The client application that models may use for procedures.

property colorcolors.Color

The colour of this role.

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

property created_atdatetime.datetime

When the object was created.

property idsnowflakes.Snowflake

The ID of this entity.

property is_hoistedbool

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.

property is_mentionablebool

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

property mentionstr

Return a raw mention string for the role.

Returns

str
The mention string to use.
property namestr

The role's name.

property permissionspermissions_.Permissions

The guild wide permissions this role gives to the members it's attached to,

This may be overridden by channel overwrites.