/
user.ts
110 lines (98 loc) · 3.9 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
import type { Permissions, Snowflake } from '../../globals.ts';
import type { APIChannel, APIConnection, APIGuildMember, APIUser, GuildFeature } from '../../payloads/v8/mod.ts';
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface } from '../../utils/internals.ts';
/**
* https://discord.com/developers/docs/resources/user#get-current-user
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type RESTGetAPICurrentUserResult = APIUser;
/**
* https://discord.com/developers/docs/resources/user#get-user
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type RESTGetAPIUserResult = APIUser;
/**
* https://discord.com/developers/docs/resources/guild#get-current-user-guild-member
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type RESTGetCurrentUserGuildMemberResult = APIGuildMember;
/**
* https://discord.com/developers/docs/resources/user#modify-current-user
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type RESTPatchAPICurrentUserJSONBody = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<{
/**
* User's username, if changed may cause the user's discriminator to be randomized
*/
username?: string;
/**
* If passed, modifies the user's avatar
*/
avatar?: string | null;
}>;
/**
* https://discord.com/developers/docs/resources/user#modify-current-user
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type RESTPatchAPICurrentUserResult = APIUser;
/**
* https://discord.com/developers/docs/resources/user#get-current-user-guilds
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface RESTGetAPICurrentUserGuildsQuery {
/**
* Get guilds before this guild ID
*/
before?: Snowflake;
/**
* Get guilds after this guild ID
*/
after?: Snowflake;
/**
* Max number of guilds to return (1-100)
*
* @default 100
*/
limit?: number;
}
/**
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface RESTAPIPartialCurrentUserGuild {
id: Snowflake;
name: string;
icon: string | null;
owner: boolean;
features: GuildFeature[];
permissions: Permissions;
}
/**
* https://discord.com/developers/docs/resources/user#get-current-user-guilds
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type RESTGetAPICurrentUserGuildsResult = RESTAPIPartialCurrentUserGuild[];
/**
* https://discord.com/developers/docs/resources/user#leave-guild
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type RESTDeleteAPICurrentUserGuildResult = never;
/**
* https://discord.com/developers/docs/resources/user#create-dm
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface RESTPostAPICurrentUserCreateDMChannelJSONBody {
/**
* The recipient to open a DM channel with
*/
recipient_id: string;
}
/**
* https://discord.com/developers/docs/resources/user#create-dm
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type RESTPostAPICurrentUserCreateDMChannelResult = APIChannel;
/**
* https://discord.com/developers/docs/resources/user#get-user-connections
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type RESTGetAPICurrentUserConnectionsResult = APIConnection[];