Results

Namespace

Type

A voice channel within a discord.Guild.

Hierarchy

Implements

Index

Type aliases

Static AnyChannel

Represents any channel type on Discord.

Static AnyGuildChannel

Represents any channel type on Discord that exists within a discord.Guild.

Properties

Readonly bitrate

bitrate: number

The bitrate for this voice channel. Voice quality increases as this value is raised at the expense of bandwidth usage.

The default is 64000. Servers without boosts may raise this up to 96000. Servers with boosts may raise higher depending on the discord.Guild.PremiumTier.

Readonly guildId

guildId: Snowflake

The id of the discord.Guild this channel resides in.

Readonly name

name: string

The name of this channel.

Readonly parentId

parentId: Snowflake | null

If the channel resides within a discord.GuildCategory, its id is set on this property.

Readonly permissionOverwrites

permissionOverwrites: IPermissionOverwrite[]

Any member or role-specific permission overwrite settings for this channel.

Note: You should use discord.GuildChannel.getMemberPermissions or the easier discord.GuildChannel.canMember function to test member permissions for a given channel.

Readonly position

position: number

The position in the channel list this channel should be displayed at.

Readonly type

The type of this channel. Always Channel.Type.GUILD_VOICE.

Readonly userLimit

userLimit: number

Limits the number of users that can connect to the voice channel.

Members with the discord.Permissions.VOICE_MOVE_MEMBERS may override this limit.

Methods

canMember

canRole

  • canRole(role: Role, permission: Permissions): boolean
  • Determines if a role can perform actions that require the permission specified in this channel.

    The permissions are calculated by finding the role in discord.GuildChannel.permissionOverwrites and applying on top of the everyone role permissions for the channel.

    Parameters

    • role: Role

      The Role you want to calculate channel-specific permissions for.

    • permission: Permissions

      The permission you are checking for. Check discord.Permissions for an exhaustive list of all permissions.

    Returns boolean

    true if the permission is granted, otherwise false.

createInvite

delete

  • delete(): Promise<void>
  • Attempts to delete the channel.

    If an error occurs, a discord.ApiError exception is thrown.

    Returns Promise<void>

edit

getGuild

getInvites

getMemberPermissions

getParent

getRolePermissions

  • getRolePermissions(role: Role): number
  • Returns the calculated role permissions for this channel.

    The permissions are calculated by finding the role in discord.GuildChannel.permissionOverwrites and applying on top of the everyone role permissions for the channel.

    Note: If you just want to see if a role has a permission, use discord.GuildChannel.canRole.

    Parameters

    • role: Role

      The Role you want to calculate channel-specific permissions for.

    Returns number

    The permission bit set calculated for the given role.

toMention

  • toMention(): string
  • Returns a mention string in the format of <#id> where id is the id of this channel.

    Can be used in a message to render a link to this channel.

    Returns string

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc