.applyEditPatch(_data)
_data: APIChannel → void
channel.applyEditPatch(_data);Class
A channel in a guild (text, voice, category, etc.).
Extends Channel
new GuildChannel(client: Client, data: APIChannel)ClientAPIChannel| Name | Type | Description |
|---|---|---|
| guildIdread-only | string | Guild ID this channel belongs to. |
| name | string | null | |
| parentId | string | null | Parent category ID, or null if none. |
| permissionOverwrites | APIChannelOverwrite[] | Permission overwrites for roles/members. |
| position? | number | Position in the channel list. |
_data: APIChannel → void
channel.applyEditPatch(_data);→ boolean
Check if the bot can send messages in this channel (with permissions).
channel.canSendMessage();options?: ChannelInviteCreateOptions → Promise<Invite>
Create an invite for this channel. Requires Create Instant Invite.
await channel.createInvite();options: { name: string; avatar?: string | null; } → Promise<Webhook>
Create a webhook for this channel. Requires Manage Webhooks.
await channel.createWebhook(options);options?: SudoVerificationOptions & { silent?: boolean; deleteMessages?: boolean } → Promise<void>
Delete this channel. Requires Manage Channels or channel ownership.
await channel.delete();overwriteId: string → Promise<void>
Delete a permission overwrite. Requires Manage Roles.
await channel.deletePermission(overwriteId);options: ChannelEditOptions → Promise<this>
Edit this channel's settings. Requires Manage Channels.
await channel.edit(options);overwriteId: string, options: { type: OverwriteType; allow?: string; deny?: string; } → Promise<void>
Edit or create a permission overwrite. Requires Manage Roles.
await channel.editPermission(overwriteId, options);→ Promise<Invite[]>
Fetch all invites for this channel. Requires Manage Channels.
await channel.fetchInvites();→ Promise<Webhook[]>
Fetch all webhooks in this channel. Requires Manage Webhooks.
await channel.fetchWebhooks();