revbot.js
    Preparing search index...

    Class ServerManager

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    cache: Map<string, Server> = ...

    Insertion ordered cache of items this manager holds.

    defaultMaxSize: number = -1

    Shared default max size for all managers (can be changed globally).

    Methods

    • Parameters

      Returns null | Server

    • Parameters

      • resolvable:
            | string
            | {
                _id: string;
                analytics?: boolean;
                banner?: | null
                | {
                    _id: string;
                    content_type: string;
                    deleted?: null
                    | boolean;
                    filename: string;
                    message_id?: null | string;
                    metadata:
                        | { type: "File" }
                        | { type: "Text" }
                        | { height: number; type: "Image"; width: number }
                        | { height: number; type: "Video"; width: number }
                        | { type: "Audio" };
                    object_id?: null | string;
                    reported?: null | boolean;
                    server_id?: null | string;
                    size: number;
                    tag: string;
                    user_id?: null | string;
                };
                categories?: null
                | { channels: string[]; id: string; title: string }[];
                channels: string[];
                default_permissions: number;
                description?: null | string;
                discoverable?: boolean;
                flags?: number;
                icon?:
                    | null
                    | {
                        _id: string;
                        content_type: string;
                        deleted?: null
                        | boolean;
                        filename: string;
                        message_id?: null | string;
                        metadata:
                            | { type: "File" }
                            | { type: "Text" }
                            | { height: number; type: "Image"; width: number }
                            | { height: number; type: "Video"; width: number }
                            | { type: "Audio" };
                        object_id?: null | string;
                        reported?: null | boolean;
                        server_id?: null | string;
                        size: number;
                        tag: string;
                        user_id?: null | string;
                    };
                name: string;
                nsfw?: boolean;
                owner: string;
                roles?: {
                    [key: string]: {
                        colour?: null
                        | string;
                        hoist?: boolean;
                        name: string;
                        permissions: { a: number; d: number };
                        rank?: number;
                    };
                };
                system_messages?: | null
                | {
                    user_banned?: null
                    | string;
                    user_joined?: null | string;
                    user_kicked?: null | string;
                    user_left?: null | string;
                };
            }
        • string
        • {
              _id: string;
              analytics?: boolean;
              banner?:
                  | null
                  | {
                      _id: string;
                      content_type: string;
                      deleted?: null
                      | boolean;
                      filename: string;
                      message_id?: null | string;
                      metadata:
                          | { type: "File" }
                          | { type: "Text" }
                          | { height: number; type: "Image"; width: number }
                          | { height: number; type: "Video"; width: number }
                          | { type: "Audio" };
                      object_id?: null | string;
                      reported?: null | boolean;
                      server_id?: null | string;
                      size: number;
                      tag: string;
                      user_id?: null | string;
                  };
              categories?: null
              | { channels: string[]; id: string; title: string }[];
              channels: string[];
              default_permissions: number;
              description?: null | string;
              discoverable?: boolean;
              flags?: number;
              icon?:
                  | null
                  | {
                      _id: string;
                      content_type: string;
                      deleted?: null
                      | boolean;
                      filename: string;
                      message_id?: null | string;
                      metadata:
                          | { type: "File" }
                          | { type: "Text" }
                          | { height: number; type: "Image"; width: number }
                          | { height: number; type: "Video"; width: number }
                          | { type: "Audio" };
                      object_id?: null | string;
                      reported?: null | boolean;
                      server_id?: null | string;
                      size: number;
                      tag: string;
                      user_id?: null | string;
                  };
              name: string;
              nsfw?: boolean;
              owner: string;
              roles?: {
                  [key: string]: {
                      colour?: null
                      | string;
                      hoist?: boolean;
                      name: string;
                      permissions: { a: number; d: number };
                      rank?: number;
                  };
              };
              system_messages?: | null
              | {
                  user_banned?: null
                  | string;
                  user_joined?: null | string;
                  user_kicked?: null | string;
                  user_left?: null | string;
              };
          }
          • _id: string

            Unique Id

          • Optionalanalytics?: boolean

            Whether to enable analytics

          • Optionalbanner?:
                | null
                | {
                    _id: string;
                    content_type: string;
                    deleted?: null
                    | boolean;
                    filename: string;
                    message_id?: null | string;
                    metadata:
                        | { type: "File" }
                        | { type: "Text" }
                        | { height: number; type: "Image"; width: number }
                        | { height: number; type: "Video"; width: number }
                        | { type: "Audio" };
                    object_id?: null | string;
                    reported?: null | boolean;
                    server_id?: null | string;
                    size: number;
                    tag: string;
                    user_id?: null | string;
                }

            Banner attachment

          • Optionalcategories?: null | { channels: string[]; id: string; title: string }[]

            Categories for this server

          • channels: string[]

            Channels within this server

          • default_permissions: number

            Format: int64

            Default set of server and channel permissions

          • Optionaldescription?: null | string

            Description for the server

          • Optionaldiscoverable?: boolean

            Whether this server should be publicly discoverable

          • Optionalflags?: number

            Format: uint32

            Bitfield of server flags

          • Optionalicon?:
                | null
                | {
                    _id: string;
                    content_type: string;
                    deleted?: null
                    | boolean;
                    filename: string;
                    message_id?: null | string;
                    metadata:
                        | { type: "File" }
                        | { type: "Text" }
                        | { height: number; type: "Image"; width: number }
                        | { height: number; type: "Video"; width: number }
                        | { type: "Audio" };
                    object_id?: null | string;
                    reported?: null | boolean;
                    server_id?: null | string;
                    size: number;
                    tag: string;
                    user_id?: null | string;
                }

            Icon attachment

          • name: string

            Name of the server

          • Optionalnsfw?: boolean

            Whether this server is flagged as not safe for work

          • owner: string

            User id of the owner

          • Optionalroles?: {
                [key: string]: {
                    colour?: null | string;
                    hoist?: boolean;
                    name: string;
                    permissions: { a: number; d: number };
                    rank?: number;
                };
            }

            Roles for this server

          • Optionalsystem_messages?:
                | null
                | {
                    user_banned?: null
                    | string;
                    user_joined?: null | string;
                    user_kicked?: null | string;
                    user_left?: null | string;
                }

            Configuration for sending system event messages

      Returns null | Server

    • Parameters

      • resolvable:
            | string
            | Server
            | {
                _id: string;
                analytics?: boolean;
                banner?: | null
                | {
                    _id: string;
                    content_type: string;
                    deleted?: null
                    | boolean;
                    filename: string;
                    message_id?: null | string;
                    metadata:
                        | { type: "File" }
                        | { type: "Text" }
                        | { height: number; type: "Image"; width: number }
                        | { height: number; type: "Video"; width: number }
                        | { type: "Audio" };
                    object_id?: null | string;
                    reported?: null | boolean;
                    server_id?: null | string;
                    size: number;
                    tag: string;
                    user_id?: null | string;
                };
                categories?: null
                | { channels: string[]; id: string; title: string }[];
                channels: string[];
                default_permissions: number;
                description?: null | string;
                discoverable?: boolean;
                flags?: number;
                icon?:
                    | null
                    | {
                        _id: string;
                        content_type: string;
                        deleted?: null
                        | boolean;
                        filename: string;
                        message_id?: null | string;
                        metadata:
                            | { type: "File" }
                            | { type: "Text" }
                            | { height: number; type: "Image"; width: number }
                            | { height: number; type: "Video"; width: number }
                            | { type: "Audio" };
                        object_id?: null | string;
                        reported?: null | boolean;
                        server_id?: null | string;
                        size: number;
                        tag: string;
                        user_id?: null | string;
                    };
                name: string;
                nsfw?: boolean;
                owner: string;
                roles?: {
                    [key: string]: {
                        colour?: null
                        | string;
                        hoist?: boolean;
                        name: string;
                        permissions: { a: number; d: number };
                        rank?: number;
                    };
                };
                system_messages?: | null
                | {
                    user_banned?: null
                    | string;
                    user_joined?: null | string;
                    user_kicked?: null | string;
                    user_left?: null | string;
                };
            }
        • string
        • Server
        • {
              _id: string;
              analytics?: boolean;
              banner?:
                  | null
                  | {
                      _id: string;
                      content_type: string;
                      deleted?: null
                      | boolean;
                      filename: string;
                      message_id?: null | string;
                      metadata:
                          | { type: "File" }
                          | { type: "Text" }
                          | { height: number; type: "Image"; width: number }
                          | { height: number; type: "Video"; width: number }
                          | { type: "Audio" };
                      object_id?: null | string;
                      reported?: null | boolean;
                      server_id?: null | string;
                      size: number;
                      tag: string;
                      user_id?: null | string;
                  };
              categories?: null
              | { channels: string[]; id: string; title: string }[];
              channels: string[];
              default_permissions: number;
              description?: null | string;
              discoverable?: boolean;
              flags?: number;
              icon?:
                  | null
                  | {
                      _id: string;
                      content_type: string;
                      deleted?: null
                      | boolean;
                      filename: string;
                      message_id?: null | string;
                      metadata:
                          | { type: "File" }
                          | { type: "Text" }
                          | { height: number; type: "Image"; width: number }
                          | { height: number; type: "Video"; width: number }
                          | { type: "Audio" };
                      object_id?: null | string;
                      reported?: null | boolean;
                      server_id?: null | string;
                      size: number;
                      tag: string;
                      user_id?: null | string;
                  };
              name: string;
              nsfw?: boolean;
              owner: string;
              roles?: {
                  [key: string]: {
                      colour?: null
                      | string;
                      hoist?: boolean;
                      name: string;
                      permissions: { a: number; d: number };
                      rank?: number;
                  };
              };
              system_messages?: | null
              | {
                  user_banned?: null
                  | string;
                  user_joined?: null | string;
                  user_kicked?: null | string;
                  user_left?: null | string;
              };
          }
          • _id: string

            Unique Id

          • Optionalanalytics?: boolean

            Whether to enable analytics

          • Optionalbanner?:
                | null
                | {
                    _id: string;
                    content_type: string;
                    deleted?: null
                    | boolean;
                    filename: string;
                    message_id?: null | string;
                    metadata:
                        | { type: "File" }
                        | { type: "Text" }
                        | { height: number; type: "Image"; width: number }
                        | { height: number; type: "Video"; width: number }
                        | { type: "Audio" };
                    object_id?: null | string;
                    reported?: null | boolean;
                    server_id?: null | string;
                    size: number;
                    tag: string;
                    user_id?: null | string;
                }

            Banner attachment

          • Optionalcategories?: null | { channels: string[]; id: string; title: string }[]

            Categories for this server

          • channels: string[]

            Channels within this server

          • default_permissions: number

            Format: int64

            Default set of server and channel permissions

          • Optionaldescription?: null | string

            Description for the server

          • Optionaldiscoverable?: boolean

            Whether this server should be publicly discoverable

          • Optionalflags?: number

            Format: uint32

            Bitfield of server flags

          • Optionalicon?:
                | null
                | {
                    _id: string;
                    content_type: string;
                    deleted?: null
                    | boolean;
                    filename: string;
                    message_id?: null | string;
                    metadata:
                        | { type: "File" }
                        | { type: "Text" }
                        | { height: number; type: "Image"; width: number }
                        | { height: number; type: "Video"; width: number }
                        | { type: "Audio" };
                    object_id?: null | string;
                    reported?: null | boolean;
                    server_id?: null | string;
                    size: number;
                    tag: string;
                    user_id?: null | string;
                }

            Icon attachment

          • name: string

            Name of the server

          • Optionalnsfw?: boolean

            Whether this server is flagged as not safe for work

          • owner: string

            User id of the owner

          • Optionalroles?: {
                [key: string]: {
                    colour?: null | string;
                    hoist?: boolean;
                    name: string;
                    permissions: { a: number; d: number };
                    rank?: number;
                };
            }

            Roles for this server

          • Optionalsystem_messages?:
                | null
                | {
                    user_banned?: null
                    | string;
                    user_joined?: null | string;
                    user_kicked?: null | string;
                    user_left?: null | string;
                }

            Configuration for sending system event messages

      Returns null | Server

    • Parameters

      • resolvable:
            | string
            | Server
            | {
                _id: string;
                analytics?: boolean;
                banner?: | null
                | {
                    _id: string;
                    content_type: string;
                    deleted?: null
                    | boolean;
                    filename: string;
                    message_id?: null | string;
                    metadata:
                        | { type: "File" }
                        | { type: "Text" }
                        | { height: number; type: "Image"; width: number }
                        | { height: number; type: "Video"; width: number }
                        | { type: "Audio" };
                    object_id?: null | string;
                    reported?: null | boolean;
                    server_id?: null | string;
                    size: number;
                    tag: string;
                    user_id?: null | string;
                };
                categories?: null
                | { channels: string[]; id: string; title: string }[];
                channels: string[];
                default_permissions: number;
                description?: null | string;
                discoverable?: boolean;
                flags?: number;
                icon?:
                    | null
                    | {
                        _id: string;
                        content_type: string;
                        deleted?: null
                        | boolean;
                        filename: string;
                        message_id?: null | string;
                        metadata:
                            | { type: "File" }
                            | { type: "Text" }
                            | { height: number; type: "Image"; width: number }
                            | { height: number; type: "Video"; width: number }
                            | { type: "Audio" };
                        object_id?: null | string;
                        reported?: null | boolean;
                        server_id?: null | string;
                        size: number;
                        tag: string;
                        user_id?: null | string;
                    };
                name: string;
                nsfw?: boolean;
                owner: string;
                roles?: {
                    [key: string]: {
                        colour?: null
                        | string;
                        hoist?: boolean;
                        name: string;
                        permissions: { a: number; d: number };
                        rank?: number;
                    };
                };
                system_messages?: | null
                | {
                    user_banned?: null
                    | string;
                    user_joined?: null | string;
                    user_kicked?: null | string;
                    user_left?: null | string;
                };
            }
        • string
        • Server
        • {
              _id: string;
              analytics?: boolean;
              banner?:
                  | null
                  | {
                      _id: string;
                      content_type: string;
                      deleted?: null
                      | boolean;
                      filename: string;
                      message_id?: null | string;
                      metadata:
                          | { type: "File" }
                          | { type: "Text" }
                          | { height: number; type: "Image"; width: number }
                          | { height: number; type: "Video"; width: number }
                          | { type: "Audio" };
                      object_id?: null | string;
                      reported?: null | boolean;
                      server_id?: null | string;
                      size: number;
                      tag: string;
                      user_id?: null | string;
                  };
              categories?: null
              | { channels: string[]; id: string; title: string }[];
              channels: string[];
              default_permissions: number;
              description?: null | string;
              discoverable?: boolean;
              flags?: number;
              icon?:
                  | null
                  | {
                      _id: string;
                      content_type: string;
                      deleted?: null
                      | boolean;
                      filename: string;
                      message_id?: null | string;
                      metadata:
                          | { type: "File" }
                          | { type: "Text" }
                          | { height: number; type: "Image"; width: number }
                          | { height: number; type: "Video"; width: number }
                          | { type: "Audio" };
                      object_id?: null | string;
                      reported?: null | boolean;
                      server_id?: null | string;
                      size: number;
                      tag: string;
                      user_id?: null | string;
                  };
              name: string;
              nsfw?: boolean;
              owner: string;
              roles?: {
                  [key: string]: {
                      colour?: null
                      | string;
                      hoist?: boolean;
                      name: string;
                      permissions: { a: number; d: number };
                      rank?: number;
                  };
              };
              system_messages?: | null
              | {
                  user_banned?: null
                  | string;
                  user_joined?: null | string;
                  user_kicked?: null | string;
                  user_left?: null | string;
              };
          }
          • _id: string

            Unique Id

          • Optionalanalytics?: boolean

            Whether to enable analytics

          • Optionalbanner?:
                | null
                | {
                    _id: string;
                    content_type: string;
                    deleted?: null
                    | boolean;
                    filename: string;
                    message_id?: null | string;
                    metadata:
                        | { type: "File" }
                        | { type: "Text" }
                        | { height: number; type: "Image"; width: number }
                        | { height: number; type: "Video"; width: number }
                        | { type: "Audio" };
                    object_id?: null | string;
                    reported?: null | boolean;
                    server_id?: null | string;
                    size: number;
                    tag: string;
                    user_id?: null | string;
                }

            Banner attachment

          • Optionalcategories?: null | { channels: string[]; id: string; title: string }[]

            Categories for this server

          • channels: string[]

            Channels within this server

          • default_permissions: number

            Format: int64

            Default set of server and channel permissions

          • Optionaldescription?: null | string

            Description for the server

          • Optionaldiscoverable?: boolean

            Whether this server should be publicly discoverable

          • Optionalflags?: number

            Format: uint32

            Bitfield of server flags

          • Optionalicon?:
                | null
                | {
                    _id: string;
                    content_type: string;
                    deleted?: null
                    | boolean;
                    filename: string;
                    message_id?: null | string;
                    metadata:
                        | { type: "File" }
                        | { type: "Text" }
                        | { height: number; type: "Image"; width: number }
                        | { height: number; type: "Video"; width: number }
                        | { type: "Audio" };
                    object_id?: null | string;
                    reported?: null | boolean;
                    server_id?: null | string;
                    size: number;
                    tag: string;
                    user_id?: null | string;
                }

            Icon attachment

          • name: string

            Name of the server

          • Optionalnsfw?: boolean

            Whether this server is flagged as not safe for work

          • owner: string

            User id of the owner

          • Optionalroles?: {
                [key: string]: {
                    colour?: null | string;
                    hoist?: boolean;
                    name: string;
                    permissions: { a: number; d: number };
                    rank?: number;
                };
            }

            Roles for this server

          • Optionalsystem_messages?:
                | null
                | {
                    user_banned?: null
                    | string;
                    user_joined?: null | string;
                    user_kicked?: null | string;
                    user_left?: null | string;
                }

            Configuration for sending system event messages

      Returns null | string