revbot.js
    Preparing search index...

    Class Invite

    Represents an invite to a server or channel.

    Hierarchy (View Summary)

    Index

    Constructors

    • Creates a new Invite instance.

      Parameters

      • client: client

        The client instance.

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

        The raw data for the invite from the API.

        • {
              _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 Invite

    Properties

    channelId: string

    The ID of the channel associated with the invite.

    client: client

    The client instance.

    id: string

    The unique identifier for the object.

    inviterId: string

    The ID of the user who created the invite.

    serverId: null | string = null

    The ID of the server associated with the invite, if any.

    Accessors

    Methods

    • Updates the object with new data and returns a clone of the object.

      Parameters

      • data: PartialObject

        The data to update the object with.

      • Optionalclear: string[]

        Fields to clear in the object.

      Returns this

      A clone of the updated object.