Hierarchy

  • Omit<ServerChannel, "mentions" | "messages" | "ack" | "checkUnread" | "createInvite" | "fetchLastMessage" | "fetchMessage" | "getMentions" | "lastMessage" | "lastMessageID" | "markRead" | "send" | "unread">
    • VoiceChannel

Constructors

  • Parameters

    • client: Client
    • data: {
          _id: string;
          channel_type: "SavedMessages";
          user: string;
      } | {
          _id: string;
          active: boolean;
          channel_type: "DirectMessage";
          last_message_id?: string;
          recipients: string[];
      } | {
          _id: string;
          channel_type: "Group";
          description?: string;
          icon?: {
              _id: string;
              content_type: string;
              deleted?: boolean;
              filename: string;
              message_id?: string;
              metadata: {
                  type: "File";
              } | {
                  type: "Text";
              } | {
                  height: number;
                  type: "Image";
                  width: number;
              } | {
                  height: number;
                  type: "Video";
                  width: number;
              } | {
                  type: "Audio";
              };
              object_id?: string;
              reported?: boolean;
              server_id?: string;
              size: number;
              tag: string;
              user_id?: string;
          };
          last_message_id?: string;
          name: string;
          nsfw?: boolean;
          owner: string;
          permissions?: number;
          recipients: string[];
      } | {
          _id: string;
          channel_type: "TextChannel";
          default_permissions?: {
              a: number;
              d: number;
          };
          description?: string;
          icon?: {
              _id: string;
              content_type: string;
              deleted?: boolean;
              filename: string;
              message_id?: string;
              metadata: {
                  type: "File";
              } | {
                  type: "Text";
              } | {
                  height: number;
                  type: "Image";
                  width: number;
              } | {
                  height: number;
                  type: "Video";
                  width: number;
              } | {
                  type: "Audio";
              };
              object_id?: string;
              reported?: boolean;
              server_id?: string;
              size: number;
              tag: string;
              user_id?: string;
          };
          last_message_id?: string;
          name: string;
          nsfw?: boolean;
          role_permissions?: {
              [key: string]: components["schemas"]["OverrideField"];
          };
          server: string;
      } | {
          _id: string;
          channel_type: "VoiceChannel";
          default_permissions?: {
              a: number;
              d: number;
          };
          description?: string;
          icon?: {
              _id: string;
              content_type: string;
              deleted?: boolean;
              filename: string;
              message_id?: string;
              metadata: {
                  type: "File";
              } | {
                  type: "Text";
              } | {
                  height: number;
                  type: "Image";
                  width: number;
              } | {
                  height: number;
                  type: "Video";
                  width: number;
              } | {
                  type: "Audio";
              };
              object_id?: string;
              reported?: boolean;
              server_id?: string;
              size: number;
              tag: string;
              user_id?: string;
          };
          name: string;
          nsfw?: boolean;
          role_permissions?: {
              [key: string]: components["schemas"]["OverrideField"];
          };
          server: string;
      }

    Returns VoiceChannel

Properties

client: Client
createdAt: number
defaultPermissions: PermissionOverride
deleted: boolean = false
description: string
icon: any
id: string
name: string
nsfw: boolean
permissions: PermissionFlags
rolePermissions: {
    allow: PermissionFlags;
    deny: PermissionFlags;
    id: string;
}[]
server: Server
serverID: string
source: {
    _id: string;
    channel_type: "TextChannel";
    default_permissions?: {
        a: number;
        d: number;
    };
    description?: string;
    icon?: {
        _id: string;
        content_type: string;
        deleted?: boolean;
        filename: string;
        message_id?: string;
        metadata: {
            type: "File";
        } | {
            type: "Text";
        } | {
            height: number;
            type: "Image";
            width: number;
        } | {
            height: number;
            type: "Video";
            width: number;
        } | {
            type: "Audio";
        };
        object_id?: string;
        reported?: boolean;
        server_id?: string;
        size: number;
        tag: string;
        user_id?: string;
    };
    last_message_id?: string;
    name: string;
    nsfw?: boolean;
    role_permissions?: {
        [key: string]: components["schemas"]["OverrideField"];
    };
    server: string;
} | {
    _id: string;
    channel_type: "VoiceChannel";
    default_permissions?: {
        a: number;
        d: number;
    };
    description?: string;
    icon?: {
        _id: string;
        content_type: string;
        deleted?: boolean;
        filename: string;
        message_id?: string;
        metadata: {
            type: "File";
        } | {
            type: "Text";
        } | {
            height: number;
            type: "Image";
            width: number;
        } | {
            height: number;
            type: "Video";
            width: number;
        } | {
            type: "Audio";
        };
        object_id?: string;
        reported?: boolean;
        server_id?: string;
        size: number;
        tag: string;
        user_id?: string;
    };
    name: string;
    nsfw?: boolean;
    role_permissions?: {
        [key: string]: components["schemas"]["OverrideField"];
    };
    server: string;
}
type: Voice = ChannelType.Voice
typing: User[]
typingIDs: Set<string> = ...

Can include your own user ID.

Methods

  • Delete or leave this channel.

    Parameters

    • Optional silent: boolean

    Returns Promise<void>

  • Parameters

    • data: {
          archived?: boolean;
          description?: string;
          icon?: string;
          name?: string;
          nsfw?: boolean;
          owner?: string;
          remove?: ("Description" | "Icon" | "DefaultPermissions")[];
      }
      • Optional archived?: boolean

        Description

        Whether this channel is archived

      • Optional description?: string

        Description

        Channel description

      • Optional icon?: string

        Description

        Icon

        Provide an Autumn attachment Id.

      • Optional name?: string

        Description

        Channel name

      • Optional nsfw?: boolean

        Description

        Whether this channel is age-restricted

      • Optional owner?: string

        Description

        Group owner

      • Optional remove?: ("Description" | "Icon" | "DefaultPermissions")[]

    Returns Promise<ServerChannel>

  • Runs all of the callbacks for this emitter. (meant to run when an update occurs)

    Parameters

    • Optional updated: any[]

      The objects that caused this update.

    Returns void

  • Parameters

    Returns any

  • Returns this is DMChannel

  • Returns this is GroupDMChannel

  • Returns this is SavedMessagesChannel

  • Returns this is ServerChannel

  • Returns this is TextChannel

  • Returns this is VoiceChannel

  • Parameters

    Returns Message

  • Stops listening for Map updates.

    Returns

    this, useful for chaining.

    Parameters

    Returns ServerChannel

  • Listen for an update to this Map.

    Returns

    this, useful for chaining.

    Parameters

    Returns ServerChannel

  • Parameters

    Returns PermissionFlags

  • Set permissions for a role or 'default' for everyone.

    Parameters

    • role: Role | "default"
    • permissions: {
          allow: number;
          deny: number;
      }
      • allow: number

        Format: uint64

        Description

        Allow bit flags

      • deny: number

        Format: uint64

        Description

        Disallow bit flags

    Returns Promise<void>

  • Returns void

  • Returns void

  • Returns

    The channel formatted for markdown. <#id>

    Returns string

  • Update this object with new API data.

    Parameters

    • data: Partial<{
          _id: string;
          channel_type: "SavedMessages";
          user: string;
      } | {
          _id: string;
          active: boolean;
          channel_type: "DirectMessage";
          last_message_id?: string;
          recipients: string[];
      } | {
          _id: string;
          channel_type: "Group";
          description?: string;
          icon?: {
              _id: string;
              content_type: string;
              deleted?: boolean;
              filename: string;
              message_id?: string;
              metadata: {
                  type: "File";
              } | {
                  type: "Text";
              } | {
                  height: number;
                  type: "Image";
                  width: number;
              } | {
                  height: number;
                  type: "Video";
                  width: number;
              } | {
                  type: "Audio";
              };
              object_id?: string;
              reported?: boolean;
              server_id?: string;
              size: number;
              tag: string;
              user_id?: string;
          };
          last_message_id?: string;
          name: string;
          nsfw?: boolean;
          owner: string;
          permissions?: number;
          recipients: string[];
      } | {
          _id: string;
          channel_type: "TextChannel";
          default_permissions?: {
              a: number;
              d: number;
          };
          description?: string;
          icon?: {
              _id: string;
              content_type: string;
              deleted?: boolean;
              filename: string;
              message_id?: string;
              metadata: {
                  type: "File";
              } | {
                  type: "Text";
              } | {
                  height: number;
                  type: "Image";
                  width: number;
              } | {
                  height: number;
                  type: "Video";
                  width: number;
              } | {
                  type: "Audio";
              };
              object_id?: string;
              reported?: boolean;
              server_id?: string;
              size: number;
              tag: string;
              user_id?: string;
          };
          last_message_id?: string;
          name: string;
          nsfw?: boolean;
          role_permissions?: {
              [key: string]: components["schemas"]["OverrideField"];
          };
          server: string;
      } | {
          _id: string;
          channel_type: "VoiceChannel";
          default_permissions?: {
              a: number;
              d: number;
          };
          description?: string;
          icon?: {
              _id: string;
              content_type: string;
              deleted?: boolean;
              filename: string;
              message_id?: string;
              metadata: {
                  type: "File";
              } | {
                  type: "Text";
              } | {
                  height: number;
                  type: "Image";
                  width: number;
              } | {
                  height: number;
                  type: "Video";
                  width: number;
              } | {
                  type: "Audio";
              };
              object_id?: string;
              reported?: boolean;
              server_id?: string;
              size: number;
              tag: string;
              user_id?: string;
          };
          name: string;
          nsfw?: boolean;
          role_permissions?: {
              [key: string]: components["schemas"]["OverrideField"];
          };
          server: string;
      }> = {}

    Returns ServerChannel