Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Gift

Discord Nitro Gift Structure

Hierarchy

Index

Constructors

constructor

Properties

_keys

_keys: BaseSet<string> = keysGift

_keysMerge

_keysMerge: BaseSet<string> = keysMergeGift

applicationId

applicationId: string = ""

client

client: ShardClient

code

code: string = ""

expiresAt

expiresAt: Date

maxUses

maxUses: number = 0

redeemed

redeemed: boolean = false

skuId

skuId: string = ""

Optional storeListing

storeListing: StoreListing

Optional subscriptionPlan

subscriptionPlan: SubscriptionPlan

subscriptionPlanId

subscriptionPlanId: string = ""

user

user: User

uses

uses: number = 0

Accessors

longUrl

  • get longUrl(): string
  • Returns string

shardId

  • get shardId(): number
  • Returns number

url

  • get url(): string
  • Returns string

Methods

[inspect.custom]

  • [inspect.custom](): object

_getFromSnake

  • _getFromSnake(key: string): any
  • Parameters

    • key: string

    Returns any

_setFromSnake

  • _setFromSnake(key: string, value: any): any
  • Parameters

    • key: string
    • value: any

    Returns any

difference

  • difference(key: string, value: any): [boolean, any]
  • Parameters

    • key: string
    • value: any

    Returns [boolean, any]

differences

fetch

  • fetch(options: FetchGiftCode): Promise<Gift>
  • Parameters

    • options: FetchGiftCode

    Returns Promise<Gift>

merge

mergeValue

  • mergeValue(key: string, value: any): void
  • Parameters

    • key: string
    • value: any

    Returns void

redeem

  • redeem(options: RedeemGiftCode): Promise<any>
  • Parameters

    • options: RedeemGiftCode

    Returns Promise<any>

toJSON

  • toJSON(): object
  • Returns object

Generated using TypeDoc