revbot.js
    Preparing search index...

    Class ChannelAbstract

    Represents a generic communication channel in the client. This abstract class provides a base structure and common functionality for all types of channels, such as text, voice, group, and server channels.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    client: client

    The client instance.

    id: string

    The unique identifier for the object.

    type: ChannelTypes | "UNKNOWN" = "UNKNOWN"

    The type of the channel. Defaults to "UNKNOWN".

    Accessors

    Methods

    • Updates the object with new data and returns a clone of the object.

      Parameters

      • data: PartialObject

        The data to update the object with.

      • Optionalclear: string[]

        Fields to clear in the object.

      Returns this

      A clone of the updated object.

    • Deletes the current channel instance from the client's channel collection.

      This method interacts with the client's channel management system to remove the channel. Once deleted, the channel will no longer be accessible through the client.

      Returns Promise<void>

      A promise that resolves when the channel has been successfully deleted.

      const channel = client.channels.get('1234567890');
      if (channel) {
      await channel.delete();
      console.log('Channel deleted successfully.');
      }