Class ServerPublicInvite

Public Server Invite

Hierarchy (View Summary)

Constructors

  • Construct Server Invite

    Parameters

    • client: Client

      Client

    • invite: (
          | {
              channel_description?: null
              | string;
              channel_id: string;
              channel_name: string;
              code: string;
              member_count: number;
              server_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;
                  };
              server_flags?: null
              | number;
              server_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;
                  };
              server_id: string;
              server_name: string;
              type: "Server";
              user_avatar?: | 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;
              };
              user_name: string;
          }
          | {
              channel_description?: null
              | string;
              channel_id: string;
              channel_name: string;
              code: string;
              type: "Group";
              user_avatar?:
                  | 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;
                  };
              user_name: string;
          }
      ) & { type: "Server" }

      Invite

      • {
            channel_description?: null | string;
            channel_id: string;
            channel_name: string;
            code: string;
            member_count: number;
            server_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;
                };
            server_flags?: null
            | number;
            server_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;
                };
            server_id: string;
            server_name: string;
            type: "Server";
            user_avatar?: | 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;
            };
            user_name: string;
        }
        • Optionalchannel_description?: null | string

          Description of server channel

        • channel_id: string

          Id of server channel

        • channel_name: string

          Name of server channel

        • code: string

          Invite code

        • member_count: number

          Format: int64

          Number of members in this server

        • Optionalserver_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;
              }

          Attachment for server banner

        • Optionalserver_flags?: null | number

          Format: int32

          Enum of server flags

        • Optionalserver_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;
              }

          Attachment for server icon

        • server_id: string

          Id of the server

        • server_name: string

          Name of the server

        • type: "Server"
        • Optionaluser_avatar?:
              | 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;
              }

          Avatar of the user who created the invite

        • user_name: string

          Name of user who created the invite

      • {
            channel_description?: null | string;
            channel_id: string;
            channel_name: string;
            code: string;
            type: "Group";
            user_avatar?:
                | 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;
                };
            user_name: string;
        }
        • Optionalchannel_description?: null | string

          Description of group channel

        • channel_id: string

          Id of group channel

        • channel_name: string

          Name of group channel

        • code: string

          Invite code

        • type: "Group"
        • Optionaluser_avatar?:
              | 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;
              }

          Avatar of the user who created the invite

        • user_name: string

          Name of user who created the invite

      • type: "Server"

    Returns ServerPublicInvite

Properties

channelDescription?: string
channelId: string
channelName: string
client?: Client
code: string
memberCount: number
serverBanner?: File
serverFlags: ServerFlags
serverIcon?: File
serverId: string
serverName: string
type: "Group" | "Server" | "None"
userAvatar?: File
userName: string

Methods

  • Create an Invite from an API Invite Response

    Parameters

    • client: Client

      Client

    • invite:
          | {
              channel_description?: null
              | string;
              channel_id: string;
              channel_name: string;
              code: string;
              member_count: number;
              server_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;
                  };
              server_flags?: null
              | number;
              server_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;
                  };
              server_id: string;
              server_name: string;
              type: "Server";
              user_avatar?: | 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;
              };
              user_name: string;
          }
          | {
              channel_description?: null
              | string;
              channel_id: string;
              channel_name: string;
              code: string;
              type: "Group";
              user_avatar?:
                  | 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;
                  };
              user_name: string;
          }

      Data

      • {
            channel_description?: null | string;
            channel_id: string;
            channel_name: string;
            code: string;
            member_count: number;
            server_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;
                };
            server_flags?: null
            | number;
            server_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;
                };
            server_id: string;
            server_name: string;
            type: "Server";
            user_avatar?: | 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;
            };
            user_name: string;
        }
        • Optionalchannel_description?: null | string

          Description of server channel

        • channel_id: string

          Id of server channel

        • channel_name: string

          Name of server channel

        • code: string

          Invite code

        • member_count: number

          Format: int64

          Number of members in this server

        • Optionalserver_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;
              }

          Attachment for server banner

        • Optionalserver_flags?: null | number

          Format: int32

          Enum of server flags

        • Optionalserver_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;
              }

          Attachment for server icon

        • server_id: string

          Id of the server

        • server_name: string

          Name of the server

        • type: "Server"
        • Optionaluser_avatar?:
              | 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;
              }

          Avatar of the user who created the invite

        • user_name: string

          Name of user who created the invite

      • {
            channel_description?: null | string;
            channel_id: string;
            channel_name: string;
            code: string;
            type: "Group";
            user_avatar?:
                | 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;
                };
            user_name: string;
        }
        • Optionalchannel_description?: null | string

          Description of group channel

        • channel_id: string

          Id of group channel

        • channel_name: string

          Name of group channel

        • code: string

          Invite code

        • type: "Group"
        • Optionaluser_avatar?:
              | 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;
              }

          Avatar of the user who created the invite

        • user_name: string

          Name of user who created the invite

    Returns PublicChannelInvite

    Invite