revbot.js
    Preparing search index...

    Class ServerChannel

    Represents a server channel, which can be a text or voice channel.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    client: client

    The client instance.

    description: null | string = null

    The description of the channel, or null if none is set.

    icon: null | Attachment = null

    The icon of the channel, or null if none is set.

    id: string

    The unique identifier for the object.

    messages: MessageManager = ...

    Manages the messages in this Server channel.

    name: string

    The name of the channel.

    nsfw: boolean = false

    Whether the channel is marked as NSFW (Not Safe For Work).

    overwrites: Map<string, Overwrite> = ...

    The permission overwrites for the channel.

    serverId: string

    The ID of the server this channel belongs to.

    type: ChannelTypes | "UNKNOWN" = "UNKNOWN"

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

    Accessors

    • get createdTimestamp(): number

      Gets the timestamp (in milliseconds) when the channel was created.

      Returns number

      The timestamp of the channel's creation.

    Methods

    • 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.');
      }