Constructs a new GuildChannel object.
The client instance managing this channel.
The raw data from the API representing the channel.
OptionalapplicationOptionalappliedOptionalavailableOptionalbitrateOptionaldefaultOptionaldefaultOptionalguildOptionaliconOptionallastOptionallastOptionalmanagedOptionalmemberOptionalmessageOptionalnameOptionalownerOptionalparentOptionalpermissionOptionalpermissionsOptionalpositionOptionalrateOptionalrecipientsOptionalrtcOptionalthreadOptionaltopicOptionaltotalOptionaluserCreates a new channel with the specified options.
This function accepts either a ChannelPayload instance or a plain options object to create and send a channel creation request.
It validates the options, prepares the payload, and then sends the request to create the channel.
Finally, it returns a promise that resolves to the created channel's data.
The channel creation options, which can be an instance of ChannelPayload or a plain object with channel data.
A promise that resolves to the newly created channel's data.
Creates a new invite for this channel.
Sends a request to the Discord API to create an invite link with the specified options.
Options for creating the invite.
The invite object returned from the API.
Deletes the channel from the guild.
This method sends a request to the Discord API to permanently delete the specified channel. It is important to note that this action cannot be undone, and the channel will be removed from the guild and all associated data will be lost.
A promise that resolves when the channel has been successfully deleted.
Edits the properties of the channel with the specified options.
This method sends a request to the Discord API to update the channel's attributes identified by its ID within the guild. The updated channel data will be reflected in the current instance after the operation is successful.
The options for editing the channel, which can be an
instance of ChannelPayload or a plain object with channel data.
A promise that resolves to the updated GuildChannel instance.
Retrieves all active invites for this guild channel.
This method calls the Discord API to fetch all invite links that have been created for this specific channel. The returned invites include metadata such as the creator, usage limits, expiration time, etc.
⚠️ Requires the MANAGE_CHANNELS permission on the channel.
A promise that resolves to an array of Invite objects.
Sends a message to the channel with the specified options.
This function accepts either a MessagePayload instance or a plain options object to create and send a message.
It processes attachments and files, then sends the message to the channel.
Finally, it returns a Message instance representing the sent message.
The message options, which can be an instance of MessagePayload or a plain object with message data.
A promise that resolves to a Message instance representing the sent message.
Represents a Discord guild channel.