Class ServerInvite

Server Invite

Hierarchy (View Summary)

Constructors

  • Construct Server Invite

    Parameters

    • client: Client

      Client

    • invite: (
          | {
              _id: string;
              channel: string;
              creator: string;
              server: string;
              type: "Server";
          }
          | { _id: string; channel: string; creator: string; type: "Group" }
      ) & { type: "Server" }

      Invite

      • {
            _id: string;
            channel: string;
            creator: string;
            server: string;
            type: "Server";
        }
        • _id: string

          Invite code

        • channel: string

          Id of the server channel this invite points to

        • creator: string

          Id of user who created this invite

        • server: string

          Id of the server this invite points to

        • type: "Server"
      • { _id: string; channel: string; creator: string; type: "Group" }
        • _id: string

          Invite code

        • channel: string

          Id of the group channel this invite points to

        • creator: string

          Id of user who created this invite

        • type: "Group"
      • type: "Server"

    Returns ServerInvite

Properties

channelId: string
client?: Client
creatorId: string
id: string
serverId: string
type: "Group" | "Server" | "None"

Accessors

Methods

  • Create an Invite from an API Invite

    Parameters

    • client: Client

      Client

    • invite:
          | {
              _id: string;
              channel: string;
              creator: string;
              server: string;
              type: "Server";
          }
          | { _id: string; channel: string; creator: string; type: "Group" }

      Data

      • {
            _id: string;
            channel: string;
            creator: string;
            server: string;
            type: "Server";
        }
        • _id: string

          Invite code

        • channel: string

          Id of the server channel this invite points to

        • creator: string

          Id of user who created this invite

        • server: string

          Id of the server this invite points to

        • type: "Server"
      • { _id: string; channel: string; creator: string; type: "Group" }
        • _id: string

          Invite code

        • channel: string

          Id of the group channel this invite points to

        • creator: string

          Id of user who created this invite

        • type: "Group"

    Returns ChannelInvite

    Invite