Class InviteMethods

Methods for interacting with invites

Hierarchy

  • InviteMethods

Constructors

Methods

Properties

Constructors

  • Create a new Invite Method Handler

    Usually SnowTransfer creates a method handler for you, this is here for completion

    You can access the methods listed via client.invite.method, where client is an initialized SnowTransfer instance

    Parameters

    • requestHandler: RequestHandler

      request handler that calls the rest api

    Returns InviteMethods

Methods

  • Delete an invite

    Returns

    Invite Object

    Permissions needed Condition
    MANAGE_CHANNELS for invite that belongs to a specific channel
    MANAGE_GUILD delete any invite guild wide

    Example

    const client = new SnowTransfer("TOKEN")
    const invite = await client.invite.deleteInvite("inviteId")

    Parameters

    • inviteId: string

    Returns Promise<Invite>

  • Get the invite data on an invite id

    Returns

    Invite Object

    Example

    // Gets an invite with approximate_member_count and approximate_presence_count
    const client = new SnowTransfer("TOKEN")
    const invite = await client.invite.getInvite("inviteId", { with_counts: true })

    Parameters

    • inviteId: string

      Id of the invite

    • Optional query: {
          guild_scheduled_event_id?: string;
          with_counts?: boolean;
          with_expiration?: boolean;
      }

      Query params for additional metadata fields

      • Optional guild_scheduled_event_id?: string
      • Optional with_counts?: boolean
      • Optional with_expiration?: boolean

    Returns Promise<Invite>

Properties

requestHandler: RequestHandler

Generated using TypeDoc