GuildChannel
- class GuildChannel()
Base class for all guild-bound channels (text, voice, category, forum, stage, etc.).
exported from
lib.weeble.d- Extends:
Properties
- GuildChannel.parentId
type: readonly string | null | undefined
ID of the parent category channel, or
nullwhen not categorized. undefined when the payload omitted it.
- GuildChannel.permissionOverwrites
type: readonly { allow: string; deny: string; id: string; type:
PermissionOverwriteType; }[] | undefinedPermission overwrites applied to this channel. Each entry has an
allowanddenybitfield as decimal strings. undefined when the payload omitted the list (not the same as an empty list).
- GuildChannel.permissions
type: readonly
ChannelPermissionManagerManager for permission overwrites on this channel.
- GuildChannel.position
type: readonly number | undefined
Position in the channel list (left-to-right, top-to-bottom).
Methods
-
async GuildChannel.canMember(permission: bigint, member:
GuildMember) Promise<boolean> Check if a member has a specific permission in this channel.
- Parameters:
permission — – The permission flag to check.
member — – The guild member to check.
- Returns:
Whether the member has the permission.
-
async GuildChannel.canRole(permission: bigint, role:
Role) Promise<boolean> Check if a role has a specific permission in this channel.
- Parameters:
permission — – The permission flag to check.
role — – The role to check.
- Returns:
Whether the role has the permission.
-
async GuildChannel.createInvite(options:
InviteCreateOptions) Promise<Invite> Create an invite for this channel.
- Parameters:
options — – Optional invite settings (max age, max uses, etc.).
- Returns:
The created invite.
-
async GuildChannel.fetchGuild() Promise<
Guild> Fetch the guild this channel belongs to from Discord.
- Returns:
The guild object.
-
async GuildChannel.getInvites() Promise<
Invite[]> Fetch all invites for this channel.
- Returns:
Array of invites.
-
async GuildChannel.getMemberPermissions(member:
GuildMember) Promise<bigint> Get the effective permission bitmask for a specific member in this channel (accounting for overwrites).
- Parameters:
member — – The guild member to check.
- Returns:
The permission bitmask.