-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
/
rawDataTypes.d.ts
207 lines (168 loc) · 6.86 KB
/
rawDataTypes.d.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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
// These are aggregate types that are used in the typings file but do not exist as actual exported values.
// To prevent them from showing up in an editor, they are imported from here instead of exporting them there directly.
import {
APIApplication,
APIApplicationCommand,
APIApplicationCommandInteraction,
APIAttachment,
APIAuditLog,
APIAuditLogEntry,
APIBan,
APIChannel,
APIEmoji,
APIExtendedInvite,
APIGuild,
APIGuildIntegration,
APIGuildIntegrationApplication,
APIGuildMember,
APIGuildPreview,
APIGuildWelcomeScreen,
APIGuildWelcomeScreenChannel,
APIGuildWidget,
APIGuildWidgetMember,
APIInteractionDataResolvedChannel,
APIInteractionDataResolvedGuildMember,
APIInteractionGuildMember,
APIInvite,
APIInviteStageInstance,
APIMessage,
APIMessageButtonInteractionData,
APIMessageComponentInteraction,
APIMessageSelectMenuInteractionData,
APIOverwrite,
APIPartialChannel,
APIPartialEmoji,
APIPartialGuild,
APIReaction,
APIRole,
APIStageInstance,
APISticker,
APIStickerItem,
APIStickerPack,
APITeam,
APITeamMember,
APITemplate,
APIThreadMember,
APIUnavailableGuild,
APIUser,
APIVoiceRegion,
APIWebhook,
GatewayActivity,
GatewayActivityAssets,
GatewayActivityEmoji,
GatewayGuildBanAddDispatchData,
GatewayGuildMemberAddDispatchData,
GatewayGuildMemberUpdateDispatchData,
GatewayInteractionCreateDispatchData,
GatewayInviteCreateDispatchData,
GatewayInviteDeleteDispatchData,
GatewayMessageReactionAddDispatchData,
GatewayMessageUpdateDispatchData,
GatewayPresenceUpdate,
GatewayReadyDispatchData,
GatewayTypingStartDispatchData,
GatewayVoiceState,
RESTAPIPartialCurrentUserGuild,
RESTGetAPIWebhookWithTokenResult,
RESTPatchAPIChannelMessageJSONBody,
RESTPatchAPICurrentGuildMemberNicknameJSONBody,
RESTPatchAPIInteractionFollowupJSONBody,
RESTPatchAPIInteractionOriginalResponseJSONBody,
RESTPatchAPIWebhookWithTokenJSONBody,
RESTPostAPIChannelMessageJSONBody,
RESTPostAPIInteractionCallbackFormDataBody,
RESTPostAPIInteractionFollowupJSONBody,
RESTPostAPIWebhookWithTokenJSONBody,
Snowflake,
} from 'discord-api-types/v9';
import { GuildChannel, Guild, PermissionOverwrites } from '.';
export type RawActivityData = GatewayActivity;
export type RawApplicationData = RawClientApplicationData | RawIntegrationApplicationData;
export type RawClientApplicationData = GatewayReadyDispatchData['application'] | APIMessage['application'];
export type RawIntegrationApplicationData = APIGuildIntegrationApplication | Partial<APIApplication>;
export type RawApplicationCommandData = APIApplicationCommand;
export type RawChannelData =
| RawGuildChannelData
| RawThreadChannelData
| RawDMChannelData
| RawPartialGroupDMChannelData;
export type RawDMChannelData = APIChannel | APIInteractionDataResolvedChannel;
export type RawGuildChannelData = APIChannel | APIInteractionDataResolvedChannel | Required<APIPartialChannel>;
export type RawPartialGroupDMChannelData = APIChannel | Required<APIPartialChannel>;
export type RawThreadChannelData = APIChannel | APIInteractionDataResolvedChannel;
export type RawEmojiData =
| RawGuildEmojiData
| RawReactionEmojiData
| GatewayActivityEmoji
| Omit<Partial<APIPartialEmoji>, 'animated'>;
export type RawGuildEmojiData = APIEmoji;
export type RawReactionEmojiData = APIEmoji | APIPartialEmoji;
export type RawGuildAuditLogData = APIAuditLog;
export type RawGuildAuditLogEntryData = APIAuditLogEntry;
export type RawGuildBanData = GatewayGuildBanAddDispatchData | APIBan;
export type RawGuildData = APIGuild | APIUnavailableGuild;
export type RawAnonymousGuildData = RawGuildData | RawInviteGuildData;
export type RawBaseGuildData = RawAnonymousGuildData | RawOAuth2GuildData;
export type RawInviteGuildData = APIPartialGuild;
export type RawOAuth2GuildData = RESTAPIPartialCurrentUserGuild;
export type RawGuildMemberData =
| APIGuildMember
| APIInteractionGuildMember
| APIInteractionDataResolvedGuildMember
| GatewayGuildMemberAddDispatchData
| GatewayGuildMemberUpdateDispatchData
| Required<RESTPatchAPICurrentGuildMemberNicknameJSONBody>
| { user: { id: Snowflake } };
export type RawThreadMemberData = APIThreadMember;
export type RawGuildPreviewData = APIGuildPreview;
export type RawGuildTemplateData = APITemplate;
export type RawIntegrationData = APIGuildIntegration;
export type RawInteractionData = GatewayInteractionCreateDispatchData;
export type RawCommandInteractionData = APIApplicationCommandInteraction;
export type RawMessageComponentInteractionData = APIMessageComponentInteraction;
export type RawMessageButtonInteractionData = APIMessageButtonInteractionData;
export type RawMessageSelectMenuInteractionData = APIMessageSelectMenuInteractionData;
export type RawInviteData =
| APIExtendedInvite
| APIInvite
| (GatewayInviteCreateDispatchData & { channel: GuildChannel; guild: Guild })
| (GatewayInviteDeleteDispatchData & { channel: GuildChannel; guild: Guild });
export type RawInviteStageInstance = APIInviteStageInstance;
export type RawMessageData = APIMessage;
export type RawPartialMessageData = GatewayMessageUpdateDispatchData;
export type RawMessageAttachmentData = APIAttachment;
export type RawMessagePayloadData =
| RESTPostAPIChannelMessageJSONBody
| RESTPatchAPIChannelMessageJSONBody
| RESTPostAPIWebhookWithTokenJSONBody
| RESTPatchAPIWebhookWithTokenJSONBody
| RESTPostAPIInteractionCallbackFormDataBody
| RESTPatchAPIInteractionOriginalResponseJSONBody
| RESTPostAPIInteractionFollowupJSONBody
| RESTPatchAPIInteractionFollowupJSONBody;
export type RawMessageReactionData = APIReaction | GatewayMessageReactionAddDispatchData;
export type RawPermissionOverwriteData = APIOverwrite | PermissionOverwrites;
export type RawPresenceData = GatewayPresenceUpdate;
export type RawRoleData = APIRole;
export type RawRichPresenceAssets = GatewayActivityAssets;
export type RawStageInstanceData =
| APIStageInstance
| (Partial<APIStageInstance> & Pick<APIStageInstance, 'id' | 'channel_id' | 'guild_id'>);
export type RawStickerData = APISticker | APIStickerItem;
export type RawStickerPackData = APIStickerPack;
export type RawTeamData = APITeam;
export type RawTeamMemberData = APITeamMember;
export type RawTypingData = GatewayTypingStartDispatchData;
export type RawUserData =
| (APIUser & { member?: Omit<APIGuildMember, 'user'> })
| (GatewayPresenceUpdate['user'] & Pick<APIUser, 'username'>);
export type RawVoiceRegionData = APIVoiceRegion;
export type RawVoiceStateData = GatewayVoiceState | Omit<GatewayVoiceState, 'guild_id'>;
export type RawWebhookData =
| APIWebhook
| RESTGetAPIWebhookWithTokenResult
| (Partial<APIWebhook> & Required<Pick<APIWebhook, 'id' | 'guild_id'>>);
export type RawWelcomeChannelData = APIGuildWelcomeScreenChannel;
export type RawWelcomeScreenData = APIGuildWelcomeScreen;
export type RawWidgetData = APIGuildWidget;
export type RawWidgetMemberData = APIGuildWidgetMember;