Skip to content

Invite

Invite ⇐ Base

Represents an invite to a guild.

Kind: global class
Extends: Base

new Invite([data], guild, client)

Constructs a new instance of the Invite class.

ParamTypeDescription
[data]ObjectThe data for the invite.
guildGuildThe guild that the invite belongs to.
clientClientThe client instance.

invite.fetch(options) ⇒ Promise

Fetches an invite using the provided options.

Kind: instance method of Invite
Returns: Promise - A promise that resolves to the fetched invite.

ParamTypeDescription
optionsobjectThe options for fetching the invite.

invite.delete(reason) ⇒ Promise.<void>

Deletes the invite associated with the guild.

Kind: instance method of Invite
Returns: Promise.<void> - - A promise that resolves when the invite is deleted.

ParamTypeDescription
reasonstringThe reason for deleting the invite.