Options
All
  • Public
  • Public/Protected
  • All
Menu

Class InviteMethods

Methods for interacting with invites

Hierarchy

  • InviteMethods

Index

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

    Returns <internal>.InviteMethods

Properties

requestHandler: <internal>.RequestHandler
default: typeof <internal>.InviteMethods

Methods

  • Delete an invite

    example

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

    Parameters

    • inviteId: string

    Returns Promise<<internal>.Invite>

    (https://discord.com/developers/docs/resources/invite#invite-object)

    Permissions needed Condition
    MANAGE_CHANNELS for invite that belongs to a specific channel
    MANAGE_GUILD delete any invite guild wide
  • getInvite(inviteId: string, query?: { guild_scheduled_event_id?: string; with_counts?: boolean; with_expiration?: boolean }): Promise<<internal>.Invite>
  • Get the invite data on an invite id

    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<<internal>.Invite>

Generated using TypeDoc