.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 | null | Guild ID this channel belongs to, or null if missing from the payload. |
| name | string | null | |
| parentId | string | null | Parent category ID, or null if none. |
| permissionOverwritesread-only | PermissionOverwriteManager | Permission overwrites for roles/members. |
| position? | number | Position in the channel list. |
_data: APIChannel → void
channel.applyEditPatch(_data);→ Promise<boolean>
Like canSendMessage, but hydrates members.me via REST when missing. Returns false when the channel has no guildId.
await channel.canSend();→ boolean
Check if the bot can send messages in this channel (cache-only; needs members.me).
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: ChannelEditOptions → Promise<this>
Edit this channel's settings. Requires Manage Channels.
await channel.edit(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();