-
-
Notifications
You must be signed in to change notification settings - Fork 116
/
invite.ts
42 lines (38 loc) · 1.29 KB
/
invite.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/**
* Types extracted from https://discord.com/developers/docs/resources/invite
*/
import type { APIPartialChannel } from './channel.ts';
import type { APIPartialGuild } from './guild.ts';
import type { APIUser } from './user.ts';
/**
* https://discord.com/developers/docs/resources/invite#invite-object
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIInvite {
code: string;
guild?: APIPartialGuild;
channel?: Required<APIPartialChannel>;
inviter?: APIUser;
target_user?: APIUser;
target_user_type?: InviteTargetUserType;
approximate_presence_count?: number;
approximate_member_count?: number;
}
/**
* https://discord.com/developers/docs/resources/invite#invite-object-target-user-types
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export enum InviteTargetUserType {
STREAM = 1,
}
/**
* https://discord.com/developers/docs/resources/invite#invite-metadata-object
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIExtendedInvite extends APIInvite {
uses: number;
max_uses: number;
max_age: number;
temporary: boolean;
created_at: string;
}