-
-
Notifications
You must be signed in to change notification settings - Fork 114
/
user.ts
80 lines (74 loc) · 2.11 KB
/
user.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/**
* Types extracted from https://discord.com/developers/docs/resources/user
*/
import type { APIGuildIntegration } from './guild.ts';
/**
* https://discord.com/developers/docs/resources/user#user-object
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIUser {
id: string;
username: string;
discriminator: string;
avatar: string | null;
bot?: boolean;
system?: boolean;
mfa_enabled?: boolean;
locale?: string;
verified?: boolean;
email?: string | null;
flags?: UserFlags;
premium_type?: UserPremiumType;
public_flags?: UserFlags;
}
/**
* https://discord.com/developers/docs/resources/user#user-object-user-flags
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export enum UserFlags {
None = 0,
DiscordEmployee = 1 << 0,
PartneredServerOwner = 1 << 1,
DiscordHypeSquadEvents = 1 << 2,
BugHunterLevel1 = 1 << 3,
HypeSquadHouseBravery = 1 << 6,
HypeSquadHouseBrilliance = 1 << 7,
HypeSquadHouseBalance = 1 << 8,
EarlySupporter = 1 << 9,
TeamUser = 1 << 10,
System = 1 << 12,
BugHunterLevel2 = 1 << 14,
VerifiedBot = 1 << 16,
EarlyVerifiedBotDeveloper = 1 << 17,
}
/**
* https://discord.com/developers/docs/resources/user#user-object-premium-types
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export enum UserPremiumType {
None,
NitroClassic,
Nitro,
}
/**
* https://discord.com/developers/docs/resources/user#connection-object
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIConnection {
id: string;
name: string;
type: string;
revoked?: boolean;
integrations?: Partial<APIGuildIntegration>[];
verified: boolean;
friend_sync: boolean;
show_activity: boolean;
visibility: ConnectionVisibility;
}
/**
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export enum ConnectionVisibility {
None,
Everyone,
}