mirror of
https://github.com/discordjs/discord.js.git
synced 2024-08-20 20:54:47 +12:00
feat(Invite): add type
(#10280)
This commit is contained in:
parent
3b5c600b9e
commit
17d4c78fde
3 changed files with 14 additions and 0 deletions
|
@ -22,6 +22,13 @@ class Invite extends Base {
|
||||||
|
|
||||||
constructor(client, data) {
|
constructor(client, data) {
|
||||||
super(client);
|
super(client);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The type of this invite
|
||||||
|
* @type {InviteType}
|
||||||
|
*/
|
||||||
|
this.type = data.type;
|
||||||
|
|
||||||
this._patch(data);
|
this._patch(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -410,6 +410,11 @@
|
||||||
* @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/InteractionResponseType}
|
* @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/InteractionResponseType}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @external InviteType
|
||||||
|
* @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/InviteType}
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @external InviteTargetType
|
* @external InviteTargetType
|
||||||
* @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/InviteTargetType}
|
* @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/InviteTargetType}
|
||||||
|
|
2
packages/discord.js/typings/index.d.ts
vendored
2
packages/discord.js/typings/index.d.ts
vendored
|
@ -180,6 +180,7 @@ import {
|
||||||
APIPollAnswer,
|
APIPollAnswer,
|
||||||
APISelectMenuDefaultValue,
|
APISelectMenuDefaultValue,
|
||||||
SelectMenuDefaultValueType,
|
SelectMenuDefaultValueType,
|
||||||
|
InviteType,
|
||||||
} from 'discord-api-types/v10';
|
} from 'discord-api-types/v10';
|
||||||
import { ChildProcess } from 'node:child_process';
|
import { ChildProcess } from 'node:child_process';
|
||||||
import { EventEmitter } from 'node:events';
|
import { EventEmitter } from 'node:events';
|
||||||
|
@ -1990,6 +1991,7 @@ export class Invite extends Base {
|
||||||
public targetUser: User | null;
|
public targetUser: User | null;
|
||||||
public targetType: InviteTargetType | null;
|
public targetType: InviteTargetType | null;
|
||||||
public temporary: boolean | null;
|
public temporary: boolean | null;
|
||||||
|
public type: InviteType;
|
||||||
public get url(): string;
|
public get url(): string;
|
||||||
public uses: number | null;
|
public uses: number | null;
|
||||||
public delete(reason?: string): Promise<Invite>;
|
public delete(reason?: string): Promise<Invite>;
|
||||||
|
|
Loading…
Reference in a new issue