@discordeno/bot 19.0.0-next.e19eca5 → 19.0.0-next.e45e5ac
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bot.d.ts +3 -1
- package/dist/bot.d.ts.map +1 -1
- package/dist/bot.js +5 -0
- package/dist/bot.js.map +1 -1
- package/dist/handlers/channels/index.d.ts +1 -0
- package/dist/handlers/channels/index.d.ts.map +1 -1
- package/dist/handlers/channels/index.js +1 -0
- package/dist/handlers/channels/index.js.map +1 -1
- package/dist/helpers.d.ts +159 -0
- package/dist/helpers.d.ts.map +1 -0
- package/dist/helpers.js +414 -0
- package/dist/helpers.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/transformers/activity.d.ts +15 -15
- package/dist/transformers/application.d.ts +3 -3
- package/dist/transformers/applicationCommand.d.ts +3 -3
- package/dist/transformers/applicationCommandPermission.d.ts +1 -1
- package/dist/transformers/attachment.d.ts +3 -3
- package/dist/transformers/auditLogEntry.d.ts +6 -6
- package/dist/transformers/automodActionExecution.d.ts +5 -5
- package/dist/transformers/channel.d.ts +2 -2
- package/dist/transformers/channel.d.ts.map +1 -1
- package/dist/transformers/channel.js +1 -1
- package/dist/transformers/channel.js.map +1 -1
- package/dist/transformers/embed.d.ts +3 -3
- package/dist/transformers/emoji.d.ts +4 -4
- package/dist/transformers/guild.d.ts +1 -1
- package/dist/transformers/index.d.ts +2 -0
- package/dist/transformers/index.d.ts.map +1 -1
- package/dist/transformers/index.js +2 -0
- package/dist/transformers/index.js.map +1 -1
- package/dist/transformers/integration.d.ts +7 -7
- package/dist/transformers/interaction.d.ts +10 -1
- package/dist/transformers/interaction.d.ts.map +1 -1
- package/dist/transformers/interaction.js +26 -1
- package/dist/transformers/interaction.js.map +1 -1
- package/dist/transformers/invite.d.ts +13 -13
- package/dist/transformers/member.d.ts +2 -2
- package/dist/transformers/member.d.ts.map +1 -1
- package/dist/transformers/member.js +2 -2
- package/dist/transformers/member.js.map +1 -1
- package/dist/transformers/presence.d.ts +1 -1
- package/dist/transformers/reverse/index.d.ts +3 -0
- package/dist/transformers/reverse/index.d.ts.map +1 -1
- package/dist/transformers/reverse/index.js +3 -0
- package/dist/transformers/reverse/index.js.map +1 -1
- package/dist/transformers/role.d.ts +2 -2
- package/dist/transformers/role.d.ts.map +1 -1
- package/dist/transformers/role.js +1 -1
- package/dist/transformers/role.js.map +1 -1
- package/dist/transformers/scheduledEvent.d.ts +5 -5
- package/dist/transformers/sticker.d.ts +5 -5
- package/dist/transformers/template.d.ts +93 -93
- package/dist/transformers/toggles/index.d.ts +2 -0
- package/dist/transformers/toggles/index.d.ts.map +1 -1
- package/dist/transformers/toggles/index.js +2 -0
- package/dist/transformers/toggles/index.js.map +1 -1
- package/dist/transformers/voiceRegion.d.ts +1 -1
- package/dist/transformers/voiceState.d.ts +2 -2
- package/dist/transformers/webhook.d.ts +6 -6
- package/dist/transformers.d.ts +3 -3
- package/dist/transformers.d.ts.map +1 -1
- package/dist/transformers.js.map +1 -1
- package/package.json +5 -5
package/dist/helpers.js
ADDED
|
@@ -0,0 +1,414 @@
|
|
|
1
|
+
import { snakelize } from '@discordeno/utils';
|
|
2
|
+
export function createBotHelpers(bot) {
|
|
3
|
+
return {
|
|
4
|
+
createAutomodRule: async (guildId, options, reason)=>{
|
|
5
|
+
return bot.transformers.automodRule(bot, snakelize(await bot.rest.createAutomodRule(guildId, options, reason)));
|
|
6
|
+
},
|
|
7
|
+
createChannel: async (guildId, options, reason)=>{
|
|
8
|
+
return bot.transformers.channel(bot, {
|
|
9
|
+
channel: snakelize(await bot.rest.createChannel(guildId, options, reason)),
|
|
10
|
+
guildId
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
createEmoji: async (guildId, options, reason)=>{
|
|
14
|
+
return bot.transformers.emoji(bot, snakelize(await bot.rest.createEmoji(guildId, options, reason)));
|
|
15
|
+
},
|
|
16
|
+
createForumThread: async (channelId, options, reason)=>{
|
|
17
|
+
return bot.transformers.channel(bot, {
|
|
18
|
+
channel: snakelize(await bot.rest.createForumThread(channelId, options, reason))
|
|
19
|
+
});
|
|
20
|
+
},
|
|
21
|
+
createGlobalApplicationCommand: async (command)=>{
|
|
22
|
+
return bot.transformers.applicationCommand(bot, snakelize(await bot.rest.createGlobalApplicationCommand(command)));
|
|
23
|
+
},
|
|
24
|
+
createGuild: async (options)=>{
|
|
25
|
+
return bot.transformers.guild(bot, {
|
|
26
|
+
guild: snakelize(await bot.rest.createGuild(options)),
|
|
27
|
+
shardId: 0
|
|
28
|
+
});
|
|
29
|
+
},
|
|
30
|
+
createGuildApplicationCommand: async (command, guildId)=>{
|
|
31
|
+
return bot.transformers.applicationCommand(bot, snakelize(await bot.rest.createGuildApplicationCommand(command, guildId)));
|
|
32
|
+
},
|
|
33
|
+
createGuildFromTemplate: async (templateCode, options)=>{
|
|
34
|
+
return bot.transformers.guild(bot, {
|
|
35
|
+
guild: snakelize(await bot.rest.createGuildFromTemplate(templateCode, options)),
|
|
36
|
+
shardId: 0
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
createGuildSticker: async (guildId, options, reason)=>{
|
|
40
|
+
return bot.transformers.sticker(bot, snakelize(await bot.rest.createGuildSticker(guildId, options, reason)));
|
|
41
|
+
},
|
|
42
|
+
createGuildTemplate: async (guildId, options)=>{
|
|
43
|
+
return bot.transformers.template(bot, snakelize(await bot.rest.createGuildTemplate(guildId, options)));
|
|
44
|
+
},
|
|
45
|
+
createInvite: async (channelId, options, reason)=>{
|
|
46
|
+
return await bot.rest.createInvite(channelId, options, reason);
|
|
47
|
+
},
|
|
48
|
+
createRole: async (guildId, options, reason)=>{
|
|
49
|
+
return bot.transformers.role(bot, {
|
|
50
|
+
role: snakelize(await bot.rest.createRole(guildId, options, reason)),
|
|
51
|
+
guildId
|
|
52
|
+
});
|
|
53
|
+
},
|
|
54
|
+
createScheduledEvent: async (guildId, options, reason)=>{
|
|
55
|
+
return bot.transformers.scheduledEvent(bot, snakelize(await bot.rest.createScheduledEvent(guildId, options, reason)));
|
|
56
|
+
},
|
|
57
|
+
createStageInstance: async (options, reason)=>{
|
|
58
|
+
return bot.transformers.stageInstance(bot, snakelize(await bot.rest.createStageInstance(options, reason)));
|
|
59
|
+
},
|
|
60
|
+
createWebhook: async (channelId, options, reason)=>{
|
|
61
|
+
return bot.transformers.webhook(bot, snakelize(await bot.rest.createWebhook(channelId, options, reason)));
|
|
62
|
+
},
|
|
63
|
+
editApplicationCommandPermissions: async (guildId, commandId, bearerToken, options)=>{
|
|
64
|
+
return bot.transformers.applicationCommandPermission(bot, snakelize(await bot.rest.editApplicationCommandPermissions(guildId, commandId, bearerToken, options)));
|
|
65
|
+
},
|
|
66
|
+
editAutomodRule: async (guildId, ruleId, options, reason)=>{
|
|
67
|
+
return bot.transformers.automodRule(bot, snakelize(await bot.rest.editAutomodRule(guildId, ruleId, options, reason)));
|
|
68
|
+
},
|
|
69
|
+
editBotProfile: async (options)=>{
|
|
70
|
+
return bot.transformers.user(bot, snakelize(await bot.rest.editBotProfile(options)));
|
|
71
|
+
},
|
|
72
|
+
editChannel: async (channelId, options, reason)=>{
|
|
73
|
+
return bot.transformers.channel(bot, {
|
|
74
|
+
channel: snakelize(await bot.rest.editChannel(channelId, options, reason))
|
|
75
|
+
});
|
|
76
|
+
},
|
|
77
|
+
editEmoji: async (guildId, id, options, reason)=>{
|
|
78
|
+
return bot.transformers.emoji(bot, snakelize(await bot.rest.editEmoji(guildId, id, options, reason)));
|
|
79
|
+
},
|
|
80
|
+
editFollowupMessage: async (token, messageId, options)=>{
|
|
81
|
+
return bot.transformers.message(bot, snakelize(await bot.rest.editFollowupMessage(token, messageId, options)));
|
|
82
|
+
},
|
|
83
|
+
editGlobalApplicationCommand: async (commandId, options)=>{
|
|
84
|
+
return bot.transformers.applicationCommand(bot, snakelize(await bot.rest.editGlobalApplicationCommand(commandId, options)));
|
|
85
|
+
},
|
|
86
|
+
editGuild: async (guildId, options, reason)=>{
|
|
87
|
+
return bot.transformers.guild(bot, {
|
|
88
|
+
guild: snakelize(await bot.rest.editGuild(guildId, options, reason)),
|
|
89
|
+
shardId: 0
|
|
90
|
+
});
|
|
91
|
+
},
|
|
92
|
+
editGuildApplicationCommand: async (commandId, guildId, options)=>{
|
|
93
|
+
return bot.transformers.applicationCommand(bot, snakelize(await bot.rest.editGuildApplicationCommand(commandId, guildId, options)));
|
|
94
|
+
},
|
|
95
|
+
editGuildSticker: async (guildId, stickerId, options, reason)=>{
|
|
96
|
+
return bot.transformers.sticker(bot, snakelize(await bot.rest.editGuildSticker(guildId, stickerId, options, reason)));
|
|
97
|
+
},
|
|
98
|
+
editGuildTemplate: async (guildId, templateCode, options)=>{
|
|
99
|
+
return bot.transformers.template(bot, snakelize(await bot.rest.editGuildTemplate(guildId, templateCode, options)));
|
|
100
|
+
},
|
|
101
|
+
editMessage: async (channelId, messageId, options)=>{
|
|
102
|
+
return bot.transformers.message(bot, snakelize(await bot.rest.editMessage(channelId, messageId, options)));
|
|
103
|
+
},
|
|
104
|
+
editOriginalInteractionResponse: async (token, options)=>{
|
|
105
|
+
const result = await bot.rest.editOriginalInteractionResponse(token, options);
|
|
106
|
+
if (!result) return;
|
|
107
|
+
return bot.transformers.message(bot, snakelize(result));
|
|
108
|
+
},
|
|
109
|
+
editOriginalWebhookMessage: async (webhookId, token, options)=>{
|
|
110
|
+
return bot.transformers.message(bot, snakelize(await bot.rest.editOriginalWebhookMessage(webhookId, token, options)));
|
|
111
|
+
},
|
|
112
|
+
editRole: async (guildId, roleId, options, reason)=>{
|
|
113
|
+
return bot.transformers.role(bot, {
|
|
114
|
+
role: snakelize(await bot.rest.editRole(guildId, roleId, options, reason)),
|
|
115
|
+
guildId
|
|
116
|
+
});
|
|
117
|
+
},
|
|
118
|
+
editRolePositions: async (guildId, options, reason)=>{
|
|
119
|
+
return snakelize(await bot.rest.editRolePositions(guildId, options, reason)).map((role)=>bot.transformers.role(bot, {
|
|
120
|
+
role,
|
|
121
|
+
guildId
|
|
122
|
+
}));
|
|
123
|
+
},
|
|
124
|
+
editScheduledEvent: async (guildId, eventId, options, reason)=>{
|
|
125
|
+
return bot.transformers.scheduledEvent(bot, snakelize(await bot.rest.editScheduledEvent(guildId, eventId, options, reason)));
|
|
126
|
+
},
|
|
127
|
+
editStageInstance: async (channelId, topic, reason)=>{
|
|
128
|
+
return bot.transformers.stageInstance(bot, snakelize(await bot.rest.editStageInstance(channelId, topic, reason)));
|
|
129
|
+
},
|
|
130
|
+
editWebhook: async (webhookId, options, reason)=>{
|
|
131
|
+
return bot.transformers.webhook(bot, snakelize(await bot.rest.editWebhook(webhookId, options, reason)));
|
|
132
|
+
},
|
|
133
|
+
editWebhookMessage: async (webhookId, token, messageId, options)=>{
|
|
134
|
+
return bot.transformers.message(bot, snakelize(await bot.rest.editWebhookMessage(webhookId, token, messageId, options)));
|
|
135
|
+
},
|
|
136
|
+
editWebhookWithToken: async (webhookId, token, options)=>{
|
|
137
|
+
return bot.transformers.webhook(bot, snakelize(await bot.rest.editWebhookWithToken(webhookId, token, options)));
|
|
138
|
+
},
|
|
139
|
+
editWelcomeScreen: async (guildId, options, reason)=>{
|
|
140
|
+
return bot.transformers.welcomeScreen(bot, snakelize(await bot.rest.editWelcomeScreen(guildId, options, reason)));
|
|
141
|
+
},
|
|
142
|
+
editWidgetSettings: async (guildId, options, reason)=>{
|
|
143
|
+
return bot.transformers.widgetSettings(bot, snakelize(await bot.rest.editWidgetSettings(guildId, options, reason)));
|
|
144
|
+
},
|
|
145
|
+
executeWebhook: async (webhookId, token, options)=>{
|
|
146
|
+
const result = await bot.rest.executeWebhook(webhookId, token, options);
|
|
147
|
+
if (!result) return;
|
|
148
|
+
return bot.transformers.message(bot, snakelize(result));
|
|
149
|
+
},
|
|
150
|
+
followAnnouncement: async (sourceChannelId, targetChannelId)=>{
|
|
151
|
+
return await bot.rest.followAnnouncement(sourceChannelId, targetChannelId);
|
|
152
|
+
},
|
|
153
|
+
getActiveThreads: async (guildId)=>{
|
|
154
|
+
return await bot.rest.getActiveThreads(guildId);
|
|
155
|
+
},
|
|
156
|
+
getApplicationInfo: async ()=>{
|
|
157
|
+
return bot.transformers.application(bot, snakelize(await bot.rest.getApplicationInfo()));
|
|
158
|
+
},
|
|
159
|
+
getApplicationCommandPermission: async (guildId, commandId)=>{
|
|
160
|
+
return bot.transformers.applicationCommandPermission(bot, snakelize(await bot.rest.getApplicationCommandPermission(guildId, commandId)));
|
|
161
|
+
},
|
|
162
|
+
getApplicationCommandPermissions: async (guildId)=>{
|
|
163
|
+
return (await bot.rest.getApplicationCommandPermissions(guildId)).map((res)=>bot.transformers.applicationCommandPermission(bot, snakelize(res)));
|
|
164
|
+
},
|
|
165
|
+
getAuditLog: async (guildId, options)=>{
|
|
166
|
+
return await bot.rest.getAuditLog(guildId, options);
|
|
167
|
+
},
|
|
168
|
+
getAutomodRule: async (guildId, ruleId)=>{
|
|
169
|
+
return bot.transformers.automodRule(bot, snakelize(await bot.rest.getAutomodRule(guildId, ruleId)));
|
|
170
|
+
},
|
|
171
|
+
getAutomodRules: async (guildId)=>{
|
|
172
|
+
return (await bot.rest.getAutomodRules(guildId)).map((res)=>bot.transformers.automodRule(bot, snakelize(res)));
|
|
173
|
+
},
|
|
174
|
+
getAvailableVoiceRegions: async ()=>{
|
|
175
|
+
return (await bot.rest.getAvailableVoiceRegions()).map((res)=>bot.transformers.voiceRegion(bot, snakelize(res)));
|
|
176
|
+
},
|
|
177
|
+
getBan: async (guildId, userId)=>{
|
|
178
|
+
return await bot.rest.getBan(guildId, userId);
|
|
179
|
+
},
|
|
180
|
+
getBans: async (guildId, options)=>{
|
|
181
|
+
return await bot.rest.getBans(guildId, options);
|
|
182
|
+
},
|
|
183
|
+
getChannel: async (channelId)=>{
|
|
184
|
+
return bot.transformers.channel(bot, {
|
|
185
|
+
channel: snakelize(await bot.rest.getChannel(channelId))
|
|
186
|
+
});
|
|
187
|
+
},
|
|
188
|
+
getChannelInvites: async (channelId)=>{
|
|
189
|
+
return await bot.rest.getChannelInvites(channelId);
|
|
190
|
+
// return (await bot.rest.getChannelInvites(channelId)).map((res) => bot.transformers.invite(bot, snakelize(res)))
|
|
191
|
+
},
|
|
192
|
+
getChannels: async (guildId)=>{
|
|
193
|
+
return (await bot.rest.getChannels(guildId)).map((res)=>bot.transformers.channel(bot, {
|
|
194
|
+
channel: snakelize(res),
|
|
195
|
+
guildId
|
|
196
|
+
}));
|
|
197
|
+
},
|
|
198
|
+
getChannelWebhooks: async (channelId)=>{
|
|
199
|
+
return (await bot.rest.getChannelWebhooks(channelId)).map((res)=>bot.transformers.webhook(bot, snakelize(res)));
|
|
200
|
+
},
|
|
201
|
+
getDmChannel: async (userId)=>{
|
|
202
|
+
return bot.transformers.channel(bot, {
|
|
203
|
+
channel: snakelize(await bot.rest.getDmChannel(userId))
|
|
204
|
+
});
|
|
205
|
+
},
|
|
206
|
+
getEmoji: async (guildId, emojiId)=>{
|
|
207
|
+
return bot.transformers.emoji(bot, snakelize(await bot.rest.getEmoji(guildId, emojiId)));
|
|
208
|
+
},
|
|
209
|
+
getEmojis: async (guildId)=>{
|
|
210
|
+
return (await bot.rest.getEmojis(guildId)).map((res)=>bot.transformers.emoji(bot, snakelize(res)));
|
|
211
|
+
},
|
|
212
|
+
getFollowupMessage: async (token, messageId)=>{
|
|
213
|
+
return bot.transformers.message(bot, snakelize(await bot.rest.getFollowupMessage(token, messageId)));
|
|
214
|
+
},
|
|
215
|
+
getGatewayBot: async ()=>{
|
|
216
|
+
return bot.transformers.gatewayBot(snakelize(await bot.rest.getGatewayBot()));
|
|
217
|
+
},
|
|
218
|
+
getGlobalApplicationCommand: async (commandId)=>{
|
|
219
|
+
return bot.transformers.applicationCommand(bot, snakelize(await bot.rest.getGlobalApplicationCommand(commandId)));
|
|
220
|
+
},
|
|
221
|
+
getGlobalApplicationCommands: async ()=>{
|
|
222
|
+
return (await bot.rest.getGlobalApplicationCommands()).map((res)=>bot.transformers.applicationCommand(bot, snakelize(res)));
|
|
223
|
+
},
|
|
224
|
+
getGuild: async (guildId, options)=>{
|
|
225
|
+
return bot.transformers.guild(bot, {
|
|
226
|
+
guild: snakelize(await bot.rest.getGuild(guildId, options)),
|
|
227
|
+
shardId: 0
|
|
228
|
+
});
|
|
229
|
+
},
|
|
230
|
+
getGuildApplicationCommand: async (commandId, guildId)=>{
|
|
231
|
+
return bot.transformers.applicationCommand(bot, snakelize(await bot.rest.getGuildApplicationCommand(commandId, guildId)));
|
|
232
|
+
},
|
|
233
|
+
getGuildApplicationCommands: async (guildId)=>{
|
|
234
|
+
return (await bot.rest.getGuildApplicationCommands(guildId)).map((res)=>bot.transformers.applicationCommand(bot, snakelize(res)));
|
|
235
|
+
},
|
|
236
|
+
getGuildPreview: async (guildId)=>{
|
|
237
|
+
return await bot.rest.getGuildPreview(guildId);
|
|
238
|
+
// return bot.transformers.xxx(bot, snakelize(await bot.rest.getGuildPreview(guildId)))
|
|
239
|
+
},
|
|
240
|
+
getGuildSticker: async (guildId, stickerId)=>{
|
|
241
|
+
return bot.transformers.sticker(bot, snakelize(await bot.rest.getGuildSticker(guildId, stickerId)));
|
|
242
|
+
},
|
|
243
|
+
getGuildStickers: async (guildId)=>{
|
|
244
|
+
return (await bot.rest.getGuildStickers(guildId)).map((res)=>bot.transformers.sticker(bot, snakelize(res)));
|
|
245
|
+
},
|
|
246
|
+
getGuildTemplate: async (templateCode)=>{
|
|
247
|
+
return bot.transformers.template(bot, snakelize(await bot.rest.getGuildTemplate(templateCode)));
|
|
248
|
+
},
|
|
249
|
+
getGuildTemplates: async (guildId)=>{
|
|
250
|
+
return (await bot.rest.getGuildTemplates(guildId)).map((res)=>bot.transformers.template(bot, snakelize(res)));
|
|
251
|
+
},
|
|
252
|
+
getGuildWebhooks: async (guildId)=>{
|
|
253
|
+
return (await bot.rest.getGuildWebhooks(guildId)).map((res)=>bot.transformers.webhook(bot, snakelize(res)));
|
|
254
|
+
},
|
|
255
|
+
getIntegrations: async (guildId)=>{
|
|
256
|
+
return (await bot.rest.getIntegrations(guildId)).map((res)=>bot.transformers.integration(bot, snakelize({
|
|
257
|
+
...res,
|
|
258
|
+
guildId: guildId.toString()
|
|
259
|
+
})));
|
|
260
|
+
},
|
|
261
|
+
getInvite: async (inviteCode, options)=>{
|
|
262
|
+
return await bot.rest.getInvite(inviteCode, options);
|
|
263
|
+
// return bot.transformers.invite(bot, snakelize(await bot.rest.getInvite(inviteCode, options)))
|
|
264
|
+
},
|
|
265
|
+
getInvites: async (guildId)=>{
|
|
266
|
+
return await bot.rest.getInvites(guildId);
|
|
267
|
+
// .map((res) => bot.transformers.invite(bot, snakelize(res)))
|
|
268
|
+
},
|
|
269
|
+
getMessage: async (channelId, messageId)=>{
|
|
270
|
+
return bot.transformers.message(bot, snakelize(await bot.rest.getMessage(channelId, messageId)));
|
|
271
|
+
},
|
|
272
|
+
getMessages: async (channelId, options)=>{
|
|
273
|
+
return (await bot.rest.getMessages(channelId, options)).map((res)=>bot.transformers.message(bot, snakelize(res)));
|
|
274
|
+
},
|
|
275
|
+
getNitroStickerPacks: async ()=>{
|
|
276
|
+
return (await bot.rest.getNitroStickerPacks()).map((res)=>bot.transformers.stickerPack(bot, snakelize(res)));
|
|
277
|
+
},
|
|
278
|
+
getOriginalInteractionResponse: async (token)=>{
|
|
279
|
+
return bot.transformers.message(bot, snakelize(await bot.rest.getOriginalInteractionResponse(token)));
|
|
280
|
+
},
|
|
281
|
+
getPinnedMessages: async (channelId)=>{
|
|
282
|
+
return (await bot.rest.getPinnedMessages(channelId)).map((res)=>bot.transformers.message(bot, snakelize(res)));
|
|
283
|
+
},
|
|
284
|
+
getPrivateArchivedThreads: async (channelId, options)=>{
|
|
285
|
+
return await bot.rest.getPrivateArchivedThreads(channelId, options);
|
|
286
|
+
// return bot.transformers.xxx(bot, snakelize(await bot.rest.getPrivateArchivedThreads(channelId, options)))
|
|
287
|
+
},
|
|
288
|
+
getPrivateJoinedArchivedThreads: async (channelId, options)=>{
|
|
289
|
+
return await bot.rest.getPrivateJoinedArchivedThreads(channelId, options);
|
|
290
|
+
// return bot.transformers.xxx(bot, snakelize(await bot.rest.getPrivateJoinedArchivedThreads(channelId, options)))
|
|
291
|
+
},
|
|
292
|
+
getPruneCount: async (guildId, options)=>{
|
|
293
|
+
return await bot.rest.getPruneCount(guildId, options);
|
|
294
|
+
// return bot.transformers.xxx(bot, snakelize(await bot.rest.getPruneCount(guildId, options)))
|
|
295
|
+
},
|
|
296
|
+
getPublicArchivedThreads: async (channelId, options)=>{
|
|
297
|
+
return await bot.rest.getPublicArchivedThreads(channelId, options);
|
|
298
|
+
// return bot.transformers.xxx(bot, snakelize(await bot.rest.getPublicArchivedThreads(channelId, options)))
|
|
299
|
+
},
|
|
300
|
+
getRoles: async (guildId)=>{
|
|
301
|
+
return snakelize(await bot.rest.getRoles(guildId)).map((role)=>bot.transformers.role(bot, {
|
|
302
|
+
role,
|
|
303
|
+
guildId
|
|
304
|
+
}));
|
|
305
|
+
},
|
|
306
|
+
getScheduledEvent: async (guildId, eventId, options)=>{
|
|
307
|
+
return bot.transformers.scheduledEvent(bot, snakelize(await bot.rest.getScheduledEvent(guildId, eventId, options)));
|
|
308
|
+
},
|
|
309
|
+
getScheduledEvents: async (guildId, options)=>{
|
|
310
|
+
return (await bot.rest.getScheduledEvents(guildId, options)).map((res)=>bot.transformers.scheduledEvent(bot, snakelize(res)));
|
|
311
|
+
},
|
|
312
|
+
getScheduledEventUsers: async (guildId, eventId, options)=>{
|
|
313
|
+
return (await bot.rest.getScheduledEventUsers(guildId, eventId, options)).map((u)=>{
|
|
314
|
+
return {
|
|
315
|
+
user: bot.transformers.user(bot, snakelize(u.user)),
|
|
316
|
+
member: u.member && bot.transformers.member(bot, snakelize(u.member), guildId, bot.transformers.snowflake(u.user.id))
|
|
317
|
+
};
|
|
318
|
+
});
|
|
319
|
+
},
|
|
320
|
+
getSessionInfo: async ()=>{
|
|
321
|
+
return bot.transformers.gatewayBot(snakelize(await bot.rest.getSessionInfo()));
|
|
322
|
+
},
|
|
323
|
+
getStageInstance: async (channelId)=>{
|
|
324
|
+
return bot.transformers.stageInstance(bot, snakelize(await bot.rest.getStageInstance(channelId)));
|
|
325
|
+
},
|
|
326
|
+
getSticker: async (stickerId)=>{
|
|
327
|
+
return bot.transformers.sticker(bot, snakelize(await bot.rest.getSticker(stickerId)));
|
|
328
|
+
},
|
|
329
|
+
getThreadMember: async (channelId, userId)=>{
|
|
330
|
+
return bot.transformers.threadMember(bot, snakelize(await bot.rest.getThreadMember(channelId, userId)));
|
|
331
|
+
},
|
|
332
|
+
getThreadMembers: async (channelId)=>{
|
|
333
|
+
return (await bot.rest.getThreadMembers(channelId)).map((res)=>bot.transformers.threadMember(bot, snakelize(res)));
|
|
334
|
+
},
|
|
335
|
+
getReactions: async (channelId, messageId, reaction, options)=>{
|
|
336
|
+
return (await bot.rest.getReactions(channelId, messageId, reaction, options)).map((res)=>bot.transformers.user(bot, snakelize(res)));
|
|
337
|
+
},
|
|
338
|
+
getUser: async (id)=>{
|
|
339
|
+
return bot.transformers.user(bot, snakelize(await bot.rest.getUser(id)));
|
|
340
|
+
},
|
|
341
|
+
getVanityUrl: async (guildId)=>{
|
|
342
|
+
return await bot.rest.getVanityUrl(guildId);
|
|
343
|
+
},
|
|
344
|
+
getVoiceRegions: async (guildId)=>{
|
|
345
|
+
return (await bot.rest.getVoiceRegions(guildId)).map((res)=>bot.transformers.voiceRegion(bot, snakelize(res)));
|
|
346
|
+
},
|
|
347
|
+
getWebhook: async (webhookId)=>{
|
|
348
|
+
return bot.transformers.webhook(bot, snakelize(await bot.rest.getWebhook(webhookId)));
|
|
349
|
+
},
|
|
350
|
+
getWebhookMessage: async (webhookId, token, messageId, options)=>{
|
|
351
|
+
return bot.transformers.message(bot, snakelize(await bot.rest.getWebhookMessage(webhookId, token, messageId, options)));
|
|
352
|
+
},
|
|
353
|
+
getWebhookWithToken: async (webhookId, token)=>{
|
|
354
|
+
return bot.transformers.webhook(bot, snakelize(await bot.rest.getWebhookWithToken(webhookId, token)));
|
|
355
|
+
},
|
|
356
|
+
getWelcomeScreen: async (guildId)=>{
|
|
357
|
+
return bot.transformers.welcomeScreen(bot, snakelize(await bot.rest.getWelcomeScreen(guildId)));
|
|
358
|
+
},
|
|
359
|
+
getWidget: async (guildId)=>{
|
|
360
|
+
return bot.transformers.widget(bot, snakelize(await bot.rest.getWidget(guildId)));
|
|
361
|
+
},
|
|
362
|
+
getWidgetSettings: async (guildId)=>{
|
|
363
|
+
return bot.transformers.widgetSettings(bot, snakelize(await bot.rest.getWidgetSettings(guildId)));
|
|
364
|
+
},
|
|
365
|
+
publishMessage: async (channelId, messageId)=>{
|
|
366
|
+
return bot.transformers.message(bot, snakelize(await bot.rest.publishMessage(channelId, messageId)));
|
|
367
|
+
},
|
|
368
|
+
sendMessage: async (channelId, options)=>{
|
|
369
|
+
return bot.transformers.message(bot, snakelize(await bot.rest.sendMessage(channelId, options)));
|
|
370
|
+
},
|
|
371
|
+
sendFollowupMessage: async (token, options)=>{
|
|
372
|
+
return bot.transformers.message(bot, snakelize(await bot.rest.sendFollowupMessage(token, options)));
|
|
373
|
+
},
|
|
374
|
+
startThreadWithMessage: async (channelId, messageId, options, reason)=>{
|
|
375
|
+
return bot.transformers.channel(bot, {
|
|
376
|
+
channel: snakelize(await bot.rest.startThreadWithMessage(channelId, messageId, options, reason))
|
|
377
|
+
});
|
|
378
|
+
},
|
|
379
|
+
startThreadWithoutMessage: async (channelId, options, reason)=>{
|
|
380
|
+
return bot.transformers.channel(bot, {
|
|
381
|
+
channel: snakelize(await bot.rest.startThreadWithoutMessage(channelId, options, reason))
|
|
382
|
+
});
|
|
383
|
+
},
|
|
384
|
+
syncGuildTemplate: async (guildId)=>{
|
|
385
|
+
return bot.transformers.template(bot, snakelize(await bot.rest.syncGuildTemplate(guildId)));
|
|
386
|
+
},
|
|
387
|
+
upsertGlobalApplicationCommands: async (commands)=>{
|
|
388
|
+
return (await bot.rest.upsertGlobalApplicationCommands(commands)).map((res)=>bot.transformers.applicationCommand(bot, snakelize(res)));
|
|
389
|
+
},
|
|
390
|
+
upsertGuildApplicationCommands: async (guildId, commands)=>{
|
|
391
|
+
return (await bot.rest.upsertGuildApplicationCommands(guildId, commands)).map((res)=>bot.transformers.applicationCommand(bot, snakelize(res)));
|
|
392
|
+
},
|
|
393
|
+
editBotMember: async (guildId, options, reason)=>{
|
|
394
|
+
return bot.transformers.member(bot, snakelize(await bot.rest.editBotMember(guildId, options, reason)), guildId, bot.id);
|
|
395
|
+
},
|
|
396
|
+
editMember: async (guildId, userId, options, reason)=>{
|
|
397
|
+
return bot.transformers.member(bot, snakelize(await bot.rest.editMember(guildId, userId, options, reason)), guildId, userId);
|
|
398
|
+
},
|
|
399
|
+
getMember: async (guildId, userId)=>{
|
|
400
|
+
return bot.transformers.member(bot, snakelize(await bot.rest.getMember(guildId, userId)), guildId, userId);
|
|
401
|
+
},
|
|
402
|
+
getMembers: async (guildId, options)=>{
|
|
403
|
+
return (await bot.rest.getMembers(guildId, options)).map((res)=>bot.transformers.member(bot, snakelize(res), guildId, bot.transformers.snowflake(res.user.id)));
|
|
404
|
+
},
|
|
405
|
+
pruneMembers: async (guildId, options, reason)=>{
|
|
406
|
+
return await bot.rest.pruneMembers(guildId, options, reason);
|
|
407
|
+
},
|
|
408
|
+
searchMembers: async (guildId, query, options)=>{
|
|
409
|
+
return (await bot.rest.searchMembers(guildId, query, options)).map((res)=>bot.transformers.member(bot, snakelize(res), guildId, bot.transformers.snowflake(res.user.id)));
|
|
410
|
+
}
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/helpers.ts"],"sourcesContent":["import type { CreateWebhook } from '@discordeno/rest'\nimport type {\n ApplicationCommandPermissions,\n AtLeastOne,\n BeginGuildPrune,\n BigString,\n CamelizedDiscordActiveThreads,\n CamelizedDiscordArchivedThreads,\n CamelizedDiscordAuditLog,\n CamelizedDiscordBan,\n CamelizedDiscordFollowedChannel,\n CamelizedDiscordGetGatewayBot,\n CamelizedDiscordGuildPreview,\n CamelizedDiscordGuildWidgetSettings,\n CamelizedDiscordInvite,\n CamelizedDiscordInviteMetadata,\n CamelizedDiscordModifyGuildWelcomeScreen,\n CamelizedDiscordPrunedCount,\n CamelizedDiscordVanityUrl,\n CamelizedDiscordVoiceRegion,\n CreateApplicationCommand,\n CreateAutoModerationRuleOptions,\n CreateChannelInvite,\n CreateForumPostWithMessage,\n CreateGuild,\n CreateGuildChannel,\n CreateGuildEmoji,\n CreateGuildFromTemplate,\n CreateGuildRole,\n CreateGuildStickerOptions,\n CreateMessageOptions,\n CreateScheduledEvent,\n CreateStageInstance,\n CreateTemplate,\n DiscordMessage,\n EditAutoModerationRuleOptions,\n EditBotMemberOptions,\n EditGuildRole,\n EditGuildStickerOptions,\n EditMessage,\n EditScheduledEvent,\n ExecuteWebhook,\n GetBans,\n GetGuildAuditLog,\n GetGuildPruneCountQuery,\n GetInvite,\n GetMessagesOptions,\n GetReactions,\n GetScheduledEventUsers,\n GetScheduledEvents,\n GetWebhookMessageOptions,\n InteractionCallbackData,\n ListArchivedThreads,\n ListGuildMembers,\n ModifyChannel,\n ModifyGuild,\n ModifyGuildEmoji,\n ModifyGuildMember,\n ModifyGuildTemplate,\n ModifyRolePositions,\n ModifyWebhook,\n SearchMembers,\n StartThreadWithMessage,\n StartThreadWithoutMessage,\n} from '@discordeno/types'\nimport { snakelize } from '@discordeno/utils'\nimport type { Bot } from './bot.js'\nimport type { Application } from './transformers/application.js'\nimport type { ApplicationCommand } from './transformers/applicationCommand.js'\nimport type { ApplicationCommandPermission } from './transformers/applicationCommandPermission.js'\nimport type { AutoModerationRule } from './transformers/automodRule.js'\nimport type { Channel } from './transformers/channel.js'\nimport type { Emoji } from './transformers/emoji.js'\nimport type { Guild } from './transformers/guild.js'\nimport type { Integration } from './transformers/integration.js'\nimport type { Member } from './transformers/member.js'\nimport type { Message } from './transformers/message.js'\nimport type { Role } from './transformers/role.js'\nimport type { ScheduledEvent } from './transformers/scheduledEvent.js'\nimport type { StageInstance } from './transformers/stageInstance.js'\nimport type { Sticker, StickerPack } from './transformers/sticker.js'\nimport type { Template } from './transformers/template.js'\nimport type { ThreadMember } from './transformers/threadMember.js'\nimport type { User } from './transformers/user.js'\nimport type { Webhook } from './transformers/webhook.js'\nimport type { WelcomeScreen } from './transformers/welcomeScreen.js'\nimport type { GuildWidget } from './transformers/widget.js'\nimport type { GuildWidgetSettings } from './transformers/widgetSettings.js'\n\nexport function createBotHelpers(bot: Bot): BotHelpers {\n return {\n createAutomodRule: async (guildId, options, reason) => {\n return bot.transformers.automodRule(bot, snakelize(await bot.rest.createAutomodRule(guildId, options, reason)))\n },\n createChannel: async (guildId, options, reason) => {\n return bot.transformers.channel(bot, { channel: snakelize(await bot.rest.createChannel(guildId, options, reason)), guildId })\n },\n createEmoji: async (guildId, options, reason) => {\n return bot.transformers.emoji(bot, snakelize(await bot.rest.createEmoji(guildId, options, reason)))\n },\n createForumThread: async (channelId, options, reason) => {\n return bot.transformers.channel(bot, { channel: snakelize(await bot.rest.createForumThread(channelId, options, reason)) })\n },\n createGlobalApplicationCommand: async (command) => {\n return bot.transformers.applicationCommand(bot, snakelize(await bot.rest.createGlobalApplicationCommand(command)))\n },\n createGuild: async (options) => {\n return bot.transformers.guild(bot, { guild: snakelize(await bot.rest.createGuild(options)), shardId: 0 })\n },\n createGuildApplicationCommand: async (command, guildId) => {\n return bot.transformers.applicationCommand(bot, snakelize(await bot.rest.createGuildApplicationCommand(command, guildId)))\n },\n createGuildFromTemplate: async (templateCode, options) => {\n return bot.transformers.guild(bot, { guild: snakelize(await bot.rest.createGuildFromTemplate(templateCode, options)), shardId: 0 })\n },\n createGuildSticker: async (guildId, options, reason) => {\n return bot.transformers.sticker(bot, snakelize(await bot.rest.createGuildSticker(guildId, options, reason)))\n },\n createGuildTemplate: async (guildId, options) => {\n return bot.transformers.template(bot, snakelize(await bot.rest.createGuildTemplate(guildId, options)))\n },\n createInvite: async (channelId, options, reason) => {\n return await bot.rest.createInvite(channelId, options, reason)\n },\n createRole: async (guildId, options, reason) => {\n return bot.transformers.role(bot, { role: snakelize(await bot.rest.createRole(guildId, options, reason)), guildId })\n },\n createScheduledEvent: async (guildId, options, reason) => {\n return bot.transformers.scheduledEvent(bot, snakelize(await bot.rest.createScheduledEvent(guildId, options, reason)))\n },\n createStageInstance: async (options, reason) => {\n return bot.transformers.stageInstance(bot, snakelize(await bot.rest.createStageInstance(options, reason)))\n },\n createWebhook: async (channelId, options, reason) => {\n return bot.transformers.webhook(bot, snakelize(await bot.rest.createWebhook(channelId, options, reason)))\n },\n editApplicationCommandPermissions: async (guildId, commandId, bearerToken, options) => {\n return bot.transformers.applicationCommandPermission(\n bot,\n snakelize(await bot.rest.editApplicationCommandPermissions(guildId, commandId, bearerToken, options)),\n )\n },\n editAutomodRule: async (guildId, ruleId, options, reason) => {\n return bot.transformers.automodRule(bot, snakelize(await bot.rest.editAutomodRule(guildId, ruleId, options, reason)))\n },\n editBotProfile: async (options) => {\n return bot.transformers.user(bot, snakelize(await bot.rest.editBotProfile(options)))\n },\n editChannel: async (channelId, options, reason) => {\n return bot.transformers.channel(bot, { channel: snakelize(await bot.rest.editChannel(channelId, options, reason)) })\n },\n editEmoji: async (guildId, id, options, reason) => {\n return bot.transformers.emoji(bot, snakelize(await bot.rest.editEmoji(guildId, id, options, reason)))\n },\n editFollowupMessage: async (token, messageId, options) => {\n return bot.transformers.message(bot, snakelize(await bot.rest.editFollowupMessage(token, messageId, options)))\n },\n editGlobalApplicationCommand: async (commandId, options) => {\n return bot.transformers.applicationCommand(bot, snakelize(await bot.rest.editGlobalApplicationCommand(commandId, options)))\n },\n editGuild: async (guildId, options, reason) => {\n return bot.transformers.guild(bot, { guild: snakelize(await bot.rest.editGuild(guildId, options, reason)), shardId: 0 })\n },\n editGuildApplicationCommand: async (commandId, guildId, options) => {\n return bot.transformers.applicationCommand(bot, snakelize(await bot.rest.editGuildApplicationCommand(commandId, guildId, options)))\n },\n editGuildSticker: async (guildId, stickerId, options, reason) => {\n return bot.transformers.sticker(bot, snakelize(await bot.rest.editGuildSticker(guildId, stickerId, options, reason)))\n },\n editGuildTemplate: async (guildId, templateCode, options) => {\n return bot.transformers.template(bot, snakelize(await bot.rest.editGuildTemplate(guildId, templateCode, options)))\n },\n editMessage: async (channelId, messageId, options) => {\n return bot.transformers.message(bot, snakelize(await bot.rest.editMessage(channelId, messageId, options)) as DiscordMessage)\n },\n editOriginalInteractionResponse: async (token, options) => {\n const result = await bot.rest.editOriginalInteractionResponse(token, options)\n if (!result) return\n\n return bot.transformers.message(bot, snakelize(result) as DiscordMessage)\n },\n editOriginalWebhookMessage: async (webhookId, token, options) => {\n return bot.transformers.message(bot, snakelize(await bot.rest.editOriginalWebhookMessage(webhookId, token, options)) as DiscordMessage)\n },\n editRole: async (guildId, roleId, options, reason) => {\n return bot.transformers.role(bot, { role: snakelize(await bot.rest.editRole(guildId, roleId, options, reason)), guildId })\n },\n editRolePositions: async (guildId, options, reason) => {\n return snakelize(await bot.rest.editRolePositions(guildId, options, reason)).map((role) => bot.transformers.role(bot, { role, guildId }))\n },\n editScheduledEvent: async (guildId, eventId, options, reason) => {\n return bot.transformers.scheduledEvent(bot, snakelize(await bot.rest.editScheduledEvent(guildId, eventId, options, reason)))\n },\n editStageInstance: async (channelId, topic, reason) => {\n return bot.transformers.stageInstance(bot, snakelize(await bot.rest.editStageInstance(channelId, topic, reason)))\n },\n editWebhook: async (webhookId, options, reason) => {\n return bot.transformers.webhook(bot, snakelize(await bot.rest.editWebhook(webhookId, options, reason)))\n },\n editWebhookMessage: async (webhookId, token, messageId, options) => {\n return bot.transformers.message(bot, snakelize(await bot.rest.editWebhookMessage(webhookId, token, messageId, options)) as DiscordMessage)\n },\n editWebhookWithToken: async (webhookId, token, options) => {\n return bot.transformers.webhook(bot, snakelize(await bot.rest.editWebhookWithToken(webhookId, token, options)))\n },\n editWelcomeScreen: async (guildId, options, reason) => {\n return bot.transformers.welcomeScreen(bot, snakelize(await bot.rest.editWelcomeScreen(guildId, options, reason)))\n },\n editWidgetSettings: async (guildId, options, reason) => {\n return bot.transformers.widgetSettings(bot, snakelize(await bot.rest.editWidgetSettings(guildId, options, reason)))\n },\n executeWebhook: async (webhookId, token, options) => {\n const result = await bot.rest.executeWebhook(webhookId, token, options)\n if (!result) return\n\n return bot.transformers.message(bot, snakelize(result) as DiscordMessage)\n },\n followAnnouncement: async (sourceChannelId, targetChannelId) => {\n return await bot.rest.followAnnouncement(sourceChannelId, targetChannelId)\n },\n getActiveThreads: async (guildId) => {\n return await bot.rest.getActiveThreads(guildId)\n },\n getApplicationInfo: async () => {\n return bot.transformers.application(bot, snakelize(await bot.rest.getApplicationInfo()))\n },\n getApplicationCommandPermission: async (guildId, commandId) => {\n return bot.transformers.applicationCommandPermission(bot, snakelize(await bot.rest.getApplicationCommandPermission(guildId, commandId)))\n },\n getApplicationCommandPermissions: async (guildId) => {\n return (await bot.rest.getApplicationCommandPermissions(guildId)).map((res) =>\n bot.transformers.applicationCommandPermission(bot, snakelize(res)),\n )\n },\n getAuditLog: async (guildId, options) => {\n return await bot.rest.getAuditLog(guildId, options)\n },\n getAutomodRule: async (guildId, ruleId) => {\n return bot.transformers.automodRule(bot, snakelize(await bot.rest.getAutomodRule(guildId, ruleId)))\n },\n getAutomodRules: async (guildId) => {\n return (await bot.rest.getAutomodRules(guildId)).map((res) => bot.transformers.automodRule(bot, snakelize(res)))\n },\n getAvailableVoiceRegions: async () => {\n return (await bot.rest.getAvailableVoiceRegions()).map((res) => bot.transformers.voiceRegion(bot, snakelize(res)))\n },\n getBan: async (guildId, userId) => {\n return await bot.rest.getBan(guildId, userId)\n },\n getBans: async (guildId, options) => {\n return await bot.rest.getBans(guildId, options)\n },\n getChannel: async (channelId) => {\n return bot.transformers.channel(bot, { channel: snakelize(await bot.rest.getChannel(channelId)) })\n },\n getChannelInvites: async (channelId) => {\n return await bot.rest.getChannelInvites(channelId)\n // return (await bot.rest.getChannelInvites(channelId)).map((res) => bot.transformers.invite(bot, snakelize(res)))\n },\n getChannels: async (guildId) => {\n return (await bot.rest.getChannels(guildId)).map((res) => bot.transformers.channel(bot, { channel: snakelize(res), guildId }))\n },\n getChannelWebhooks: async (channelId) => {\n return (await bot.rest.getChannelWebhooks(channelId)).map((res) => bot.transformers.webhook(bot, snakelize(res)))\n },\n getDmChannel: async (userId) => {\n return bot.transformers.channel(bot, { channel: snakelize(await bot.rest.getDmChannel(userId)) })\n },\n getEmoji: async (guildId, emojiId) => {\n return bot.transformers.emoji(bot, snakelize(await bot.rest.getEmoji(guildId, emojiId)))\n },\n getEmojis: async (guildId) => {\n return (await bot.rest.getEmojis(guildId)).map((res) => bot.transformers.emoji(bot, snakelize(res)))\n },\n getFollowupMessage: async (token, messageId) => {\n return bot.transformers.message(bot, snakelize(await bot.rest.getFollowupMessage(token, messageId)))\n },\n getGatewayBot: async () => {\n return bot.transformers.gatewayBot(snakelize(await bot.rest.getGatewayBot()))\n },\n getGlobalApplicationCommand: async (commandId) => {\n return bot.transformers.applicationCommand(bot, snakelize(await bot.rest.getGlobalApplicationCommand(commandId)))\n },\n getGlobalApplicationCommands: async () => {\n return (await bot.rest.getGlobalApplicationCommands()).map((res) => bot.transformers.applicationCommand(bot, snakelize(res)))\n },\n getGuild: async (guildId, options) => {\n return bot.transformers.guild(bot, { guild: snakelize(await bot.rest.getGuild(guildId, options)), shardId: 0 })\n },\n getGuildApplicationCommand: async (commandId, guildId) => {\n return bot.transformers.applicationCommand(bot, snakelize(await bot.rest.getGuildApplicationCommand(commandId, guildId)))\n },\n getGuildApplicationCommands: async (guildId) => {\n return (await bot.rest.getGuildApplicationCommands(guildId)).map((res) => bot.transformers.applicationCommand(bot, snakelize(res)))\n },\n getGuildPreview: async (guildId) => {\n return await bot.rest.getGuildPreview(guildId)\n // return bot.transformers.xxx(bot, snakelize(await bot.rest.getGuildPreview(guildId)))\n },\n getGuildSticker: async (guildId, stickerId) => {\n return bot.transformers.sticker(bot, snakelize(await bot.rest.getGuildSticker(guildId, stickerId)))\n },\n getGuildStickers: async (guildId) => {\n return (await bot.rest.getGuildStickers(guildId)).map((res) => bot.transformers.sticker(bot, snakelize(res)))\n },\n getGuildTemplate: async (templateCode) => {\n return bot.transformers.template(bot, snakelize(await bot.rest.getGuildTemplate(templateCode)))\n },\n getGuildTemplates: async (guildId) => {\n return (await bot.rest.getGuildTemplates(guildId)).map((res) => bot.transformers.template(bot, snakelize(res)))\n },\n getGuildWebhooks: async (guildId) => {\n return (await bot.rest.getGuildWebhooks(guildId)).map((res) => bot.transformers.webhook(bot, snakelize(res)))\n },\n getIntegrations: async (guildId) => {\n return (await bot.rest.getIntegrations(guildId)).map((res) =>\n bot.transformers.integration(bot, snakelize({ ...res, guildId: guildId.toString() })),\n )\n },\n getInvite: async (inviteCode, options) => {\n return await bot.rest.getInvite(inviteCode, options)\n // return bot.transformers.invite(bot, snakelize(await bot.rest.getInvite(inviteCode, options)))\n },\n getInvites: async (guildId) => {\n return await bot.rest.getInvites(guildId)\n // .map((res) => bot.transformers.invite(bot, snakelize(res)))\n },\n getMessage: async (channelId, messageId) => {\n return bot.transformers.message(bot, snakelize(await bot.rest.getMessage(channelId, messageId)))\n },\n getMessages: async (channelId, options) => {\n return (await bot.rest.getMessages(channelId, options)).map((res) => bot.transformers.message(bot, snakelize(res)))\n },\n getNitroStickerPacks: async () => {\n return (await bot.rest.getNitroStickerPacks()).map((res) => bot.transformers.stickerPack(bot, snakelize(res)))\n },\n getOriginalInteractionResponse: async (token) => {\n return bot.transformers.message(bot, snakelize(await bot.rest.getOriginalInteractionResponse(token)))\n },\n getPinnedMessages: async (channelId) => {\n return (await bot.rest.getPinnedMessages(channelId)).map((res) => bot.transformers.message(bot, snakelize(res)))\n },\n getPrivateArchivedThreads: async (channelId, options) => {\n return await bot.rest.getPrivateArchivedThreads(channelId, options)\n // return bot.transformers.xxx(bot, snakelize(await bot.rest.getPrivateArchivedThreads(channelId, options)))\n },\n getPrivateJoinedArchivedThreads: async (channelId, options) => {\n return await bot.rest.getPrivateJoinedArchivedThreads(channelId, options)\n // return bot.transformers.xxx(bot, snakelize(await bot.rest.getPrivateJoinedArchivedThreads(channelId, options)))\n },\n getPruneCount: async (guildId, options) => {\n return await bot.rest.getPruneCount(guildId, options)\n // return bot.transformers.xxx(bot, snakelize(await bot.rest.getPruneCount(guildId, options)))\n },\n getPublicArchivedThreads: async (channelId, options) => {\n return await bot.rest.getPublicArchivedThreads(channelId, options)\n // return bot.transformers.xxx(bot, snakelize(await bot.rest.getPublicArchivedThreads(channelId, options)))\n },\n getRoles: async (guildId) => {\n return snakelize(await bot.rest.getRoles(guildId)).map((role) => bot.transformers.role(bot, { role, guildId }))\n },\n getScheduledEvent: async (guildId, eventId, options) => {\n return bot.transformers.scheduledEvent(bot, snakelize(await bot.rest.getScheduledEvent(guildId, eventId, options)))\n },\n getScheduledEvents: async (guildId, options) => {\n return (await bot.rest.getScheduledEvents(guildId, options)).map((res) => bot.transformers.scheduledEvent(bot, snakelize(res)))\n },\n getScheduledEventUsers: async (guildId, eventId, options) => {\n return (await bot.rest.getScheduledEventUsers(guildId, eventId, options)).map((u) => {\n return {\n user: bot.transformers.user(bot, snakelize(u.user)),\n member: u.member && bot.transformers.member(bot, snakelize(u.member), guildId, bot.transformers.snowflake(u.user.id)),\n }\n })\n },\n getSessionInfo: async () => {\n return bot.transformers.gatewayBot(snakelize(await bot.rest.getSessionInfo()))\n },\n getStageInstance: async (channelId) => {\n return bot.transformers.stageInstance(bot, snakelize(await bot.rest.getStageInstance(channelId)))\n },\n getSticker: async (stickerId) => {\n return bot.transformers.sticker(bot, snakelize(await bot.rest.getSticker(stickerId)))\n },\n getThreadMember: async (channelId, userId) => {\n return bot.transformers.threadMember(bot, snakelize(await bot.rest.getThreadMember(channelId, userId)))\n },\n getThreadMembers: async (channelId) => {\n return (await bot.rest.getThreadMembers(channelId)).map((res) => bot.transformers.threadMember(bot, snakelize(res)))\n },\n getReactions: async (channelId, messageId, reaction, options) => {\n return (await bot.rest.getReactions(channelId, messageId, reaction, options)).map((res) => bot.transformers.user(bot, snakelize(res)))\n },\n getUser: async (id) => {\n return bot.transformers.user(bot, snakelize(await bot.rest.getUser(id)))\n },\n getVanityUrl: async (guildId) => {\n return await bot.rest.getVanityUrl(guildId)\n },\n getVoiceRegions: async (guildId) => {\n return (await bot.rest.getVoiceRegions(guildId)).map((res) => bot.transformers.voiceRegion(bot, snakelize(res)))\n },\n getWebhook: async (webhookId) => {\n return bot.transformers.webhook(bot, snakelize(await bot.rest.getWebhook(webhookId)))\n },\n getWebhookMessage: async (webhookId, token, messageId, options) => {\n return bot.transformers.message(bot, snakelize(await bot.rest.getWebhookMessage(webhookId, token, messageId, options)))\n },\n getWebhookWithToken: async (webhookId, token) => {\n return bot.transformers.webhook(bot, snakelize(await bot.rest.getWebhookWithToken(webhookId, token)))\n },\n getWelcomeScreen: async (guildId) => {\n return bot.transformers.welcomeScreen(bot, snakelize(await bot.rest.getWelcomeScreen(guildId)))\n },\n getWidget: async (guildId) => {\n return bot.transformers.widget(bot, snakelize(await bot.rest.getWidget(guildId)))\n },\n getWidgetSettings: async (guildId) => {\n return bot.transformers.widgetSettings(bot, snakelize(await bot.rest.getWidgetSettings(guildId)))\n },\n publishMessage: async (channelId, messageId) => {\n return bot.transformers.message(bot, snakelize(await bot.rest.publishMessage(channelId, messageId)))\n },\n sendMessage: async (channelId, options) => {\n return bot.transformers.message(bot, snakelize(await bot.rest.sendMessage(channelId, options)))\n },\n sendFollowupMessage: async (token, options) => {\n return bot.transformers.message(bot, snakelize(await bot.rest.sendFollowupMessage(token, options)))\n },\n startThreadWithMessage: async (channelId, messageId, options, reason) => {\n return bot.transformers.channel(bot, {\n channel: snakelize(await bot.rest.startThreadWithMessage(channelId, messageId, options, reason)),\n })\n },\n startThreadWithoutMessage: async (channelId, options, reason) => {\n return bot.transformers.channel(bot, { channel: snakelize(await bot.rest.startThreadWithoutMessage(channelId, options, reason)) })\n },\n syncGuildTemplate: async (guildId) => {\n return bot.transformers.template(bot, snakelize(await bot.rest.syncGuildTemplate(guildId)))\n },\n upsertGlobalApplicationCommands: async (commands) => {\n return (await bot.rest.upsertGlobalApplicationCommands(commands)).map((res) => bot.transformers.applicationCommand(bot, snakelize(res)))\n },\n upsertGuildApplicationCommands: async (guildId, commands) => {\n return (await bot.rest.upsertGuildApplicationCommands(guildId, commands)).map((res) => bot.transformers.applicationCommand(bot, snakelize(res)))\n },\n editBotMember: async (guildId, options, reason) => {\n return bot.transformers.member(bot, snakelize(await bot.rest.editBotMember(guildId, options, reason)), guildId, bot.id)\n },\n editMember: async (guildId, userId, options, reason) => {\n return bot.transformers.member(bot, snakelize(await bot.rest.editMember(guildId, userId, options, reason)), guildId, userId)\n },\n getMember: async (guildId, userId) => {\n return bot.transformers.member(bot, snakelize(await bot.rest.getMember(guildId, userId)), guildId, userId)\n },\n getMembers: async (guildId, options) => {\n return (await bot.rest.getMembers(guildId, options)).map((res) =>\n bot.transformers.member(bot, snakelize(res), guildId, bot.transformers.snowflake(res.user.id)),\n )\n },\n pruneMembers: async (guildId, options, reason) => {\n return await bot.rest.pruneMembers(guildId, options, reason)\n },\n searchMembers: async (guildId, query, options) => {\n return (await bot.rest.searchMembers(guildId, query, options)).map((res) =>\n bot.transformers.member(bot, snakelize(res), guildId, bot.transformers.snowflake(res.user.id)),\n )\n },\n }\n}\n\nexport interface BotHelpers {\n createAutomodRule: (guildId: BigString, options: CreateAutoModerationRuleOptions, reason?: string) => Promise<AutoModerationRule>\n createChannel: (guildId: BigString, options: CreateGuildChannel, reason?: string) => Promise<Channel>\n createEmoji: (guildId: BigString, options: CreateGuildEmoji, reason?: string) => Promise<Emoji>\n createForumThread: (channelId: BigString, options: CreateForumPostWithMessage, reason?: string) => Promise<Channel>\n createGlobalApplicationCommand: (command: CreateApplicationCommand) => Promise<ApplicationCommand>\n createGuild: (options: CreateGuild) => Promise<Guild>\n createGuildApplicationCommand: (command: CreateApplicationCommand, guildId: BigString) => Promise<ApplicationCommand>\n createGuildFromTemplate: (templateCode: string, options: CreateGuildFromTemplate) => Promise<Guild>\n createGuildSticker: (guildId: BigString, options: CreateGuildStickerOptions, reason?: string) => Promise<Sticker>\n createGuildTemplate: (guildId: BigString, options: CreateTemplate) => Promise<Template>\n createInvite: (channelId: BigString, options?: CreateChannelInvite, reason?: string) => Promise<CamelizedDiscordInvite>\n createRole: (guildId: BigString, options: CreateGuildRole, reason?: string) => Promise<Role>\n createScheduledEvent: (guildId: BigString, options: CreateScheduledEvent, reason?: string) => Promise<ScheduledEvent>\n createStageInstance: (options: CreateStageInstance, reason?: string) => Promise<StageInstance>\n createWebhook: (channelId: BigString, options: CreateWebhook, reason?: string) => Promise<Webhook>\n editApplicationCommandPermissions: (\n guildId: BigString,\n commandId: BigString,\n bearerToken: string,\n options: ApplicationCommandPermissions[],\n ) => Promise<ApplicationCommandPermission>\n editAutomodRule: (\n guildId: BigString,\n ruleId: BigString,\n options: Partial<EditAutoModerationRuleOptions>,\n reason?: string,\n ) => Promise<AutoModerationRule>\n editBotProfile: (options: { username?: string; botAvatarURL?: string | null }) => Promise<User>\n editChannel: (channelId: BigString, options: ModifyChannel, reason?: string) => Promise<Channel>\n editEmoji: (guildId: BigString, id: BigString, options: ModifyGuildEmoji, reason?: string) => Promise<Emoji>\n editFollowupMessage: (token: string, messageId: BigString, options: InteractionCallbackData) => Promise<Message>\n editGlobalApplicationCommand: (commandId: BigString, options: CreateApplicationCommand) => Promise<ApplicationCommand>\n editGuild: (guildId: BigString, options: ModifyGuild, reason?: string) => Promise<Guild>\n editGuildApplicationCommand: (commandId: BigString, guildId: BigString, options: CreateApplicationCommand) => Promise<ApplicationCommand>\n editGuildSticker: (guildId: BigString, stickerId: BigString, options: AtLeastOne<EditGuildStickerOptions>, reason?: string) => Promise<Sticker>\n editGuildTemplate: (guildId: BigString, templateCode: string, options: ModifyGuildTemplate) => Promise<Template>\n editMessage: (channelId: BigString, messageId: BigString, options: EditMessage) => Promise<Message>\n editOriginalInteractionResponse: (token: string, options: InteractionCallbackData) => Promise<Message | undefined>\n editOriginalWebhookMessage: (webhookId: BigString, token: string, options: InteractionCallbackData & { threadId?: BigString }) => Promise<Message>\n editRole: (guildId: BigString, roleId: BigString, options: EditGuildRole, reason?: string) => Promise<Role>\n editRolePositions: (guildId: BigString, options: ModifyRolePositions[], reason?: string) => Promise<Role[]>\n editScheduledEvent: (guildId: BigString, eventId: BigString, options: Partial<EditScheduledEvent>, reason?: string) => Promise<ScheduledEvent>\n editStageInstance: (channelId: BigString, topic: string, reason?: string) => Promise<StageInstance>\n editWebhook: (webhookId: BigString, options: ModifyWebhook, reason?: string) => Promise<Webhook>\n editWebhookMessage: (\n webhookId: BigString,\n token: string,\n messageId: BigString,\n options: InteractionCallbackData & { threadId?: BigString },\n ) => Promise<Message>\n editWebhookWithToken: (webhookId: BigString, token: string, options: Omit<ModifyWebhook, 'channelId'>) => Promise<Webhook>\n editWelcomeScreen: (guildId: BigString, options: CamelizedDiscordModifyGuildWelcomeScreen, reason?: string) => Promise<WelcomeScreen>\n editWidgetSettings: (guildId: BigString, options: CamelizedDiscordGuildWidgetSettings, reason?: string) => Promise<GuildWidgetSettings>\n executeWebhook: (webhookId: BigString, token: string, options: ExecuteWebhook) => Promise<Message | undefined>\n followAnnouncement: (sourceChannelId: BigString, targetChannelId: BigString) => Promise<CamelizedDiscordFollowedChannel>\n getActiveThreads: (guildId: BigString) => Promise<CamelizedDiscordActiveThreads>\n getApplicationInfo: () => Promise<Application>\n getApplicationCommandPermission: (guildId: BigString, commandId: BigString) => Promise<ApplicationCommandPermission>\n getApplicationCommandPermissions: (guildId: BigString) => Promise<ApplicationCommandPermission[]>\n getAuditLog: (guildId: BigString, options?: GetGuildAuditLog) => Promise<CamelizedDiscordAuditLog>\n getAutomodRule: (guildId: BigString, ruleId: BigString) => Promise<AutoModerationRule>\n getAutomodRules: (guildId: BigString) => Promise<AutoModerationRule[]>\n getAvailableVoiceRegions: () => Promise<CamelizedDiscordVoiceRegion[]>\n getBan: (guildId: BigString, userId: BigString) => Promise<CamelizedDiscordBan>\n getBans: (guildId: BigString, options?: GetBans) => Promise<CamelizedDiscordBan[]>\n getChannel: (channelId: BigString) => Promise<Channel>\n getChannelInvites: (channelId: BigString) => Promise<CamelizedDiscordInviteMetadata[]>\n getChannels: (guildId: BigString) => Promise<Channel[]>\n getChannelWebhooks: (channelId: BigString) => Promise<Webhook[]>\n getDmChannel: (userId: BigString) => Promise<Channel>\n getEmoji: (guildId: BigString, emojiId: BigString) => Promise<Emoji>\n getEmojis: (guildId: BigString) => Promise<Emoji[]>\n getFollowupMessage: (token: string, messageId: BigString) => Promise<Message>\n getGatewayBot: () => Promise<CamelizedDiscordGetGatewayBot>\n getGlobalApplicationCommand: (commandId: BigString) => Promise<ApplicationCommand>\n getGlobalApplicationCommands: () => Promise<ApplicationCommand[]>\n getGuild: (guildId: BigString, options?: { counts?: boolean }) => Promise<Guild>\n getGuildApplicationCommand: (commandId: BigString, guildId: BigString) => Promise<ApplicationCommand>\n getGuildApplicationCommands: (guildId: BigString) => Promise<ApplicationCommand[]>\n getGuildPreview: (guildId: BigString) => Promise<CamelizedDiscordGuildPreview>\n getGuildSticker: (guildId: BigString, stickerId: BigString) => Promise<Sticker>\n getGuildStickers: (guildId: BigString) => Promise<Sticker[]>\n getGuildTemplate: (templateCode: string) => Promise<Template>\n getGuildTemplates: (guildId: BigString) => Promise<Template[]>\n getGuildWebhooks: (guildId: BigString) => Promise<Webhook[]>\n getIntegrations: (guildId: BigString) => Promise<Integration[]>\n getInvite: (inviteCode: string, options?: GetInvite) => Promise<CamelizedDiscordInviteMetadata>\n getInvites: (guildId: BigString) => Promise<CamelizedDiscordInviteMetadata[]>\n getMessage: (channelId: BigString, messageId: BigString) => Promise<Message>\n getMessages: (channelId: BigString, options?: GetMessagesOptions) => Promise<Message[]>\n getNitroStickerPacks: () => Promise<StickerPack[]>\n getOriginalInteractionResponse: (token: string) => Promise<Message>\n getPinnedMessages: (channelId: BigString) => Promise<Message[]>\n getPrivateArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<CamelizedDiscordArchivedThreads>\n getPrivateJoinedArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<CamelizedDiscordArchivedThreads>\n getPruneCount: (guildId: BigString, options?: GetGuildPruneCountQuery) => Promise<CamelizedDiscordPrunedCount>\n getPublicArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<CamelizedDiscordArchivedThreads>\n getRoles: (guildId: BigString) => Promise<Role[]>\n getScheduledEvent: (guildId: BigString, eventId: BigString, options?: { withUserCount?: boolean }) => Promise<ScheduledEvent>\n getScheduledEvents: (guildId: BigString, options?: GetScheduledEvents) => Promise<ScheduledEvent[]>\n getScheduledEventUsers: (\n guildId: BigString,\n eventId: BigString,\n options?: GetScheduledEventUsers,\n ) => Promise<Array<{ user: User; member?: Member }>>\n getSessionInfo: () => Promise<CamelizedDiscordGetGatewayBot>\n getStageInstance: (channelId: BigString) => Promise<StageInstance>\n getSticker: (stickerId: BigString) => Promise<Sticker>\n getThreadMember: (channelId: BigString, userId: BigString) => Promise<ThreadMember>\n getThreadMembers: (channelId: BigString) => Promise<ThreadMember[]>\n getReactions: (channelId: BigString, messageId: BigString, reaction: string, options?: GetReactions) => Promise<User[]>\n getUser: (id: BigString) => Promise<User>\n getVanityUrl: (guildId: BigString) => Promise<CamelizedDiscordVanityUrl>\n getVoiceRegions: (guildId: BigString) => Promise<CamelizedDiscordVoiceRegion[]>\n getWebhook: (webhookId: BigString) => Promise<Webhook>\n getWebhookMessage: (webhookId: BigString, token: string, messageId: BigString, options?: GetWebhookMessageOptions) => Promise<Message>\n getWebhookWithToken: (webhookId: BigString, token: string) => Promise<Webhook>\n getWelcomeScreen: (guildId: BigString) => Promise<WelcomeScreen>\n getWidget: (guildId: BigString) => Promise<GuildWidget>\n getWidgetSettings: (guildId: BigString) => Promise<GuildWidgetSettings>\n publishMessage: (channelId: BigString, messageId: BigString) => Promise<Message>\n sendMessage: (channelId: BigString, options: CreateMessageOptions) => Promise<Message>\n sendFollowupMessage: (token: string, options: InteractionCallbackData) => Promise<Message>\n startThreadWithMessage: (channelId: BigString, messageId: BigString, options: StartThreadWithMessage, reason?: string) => Promise<Channel>\n startThreadWithoutMessage: (channelId: BigString, options: StartThreadWithoutMessage, reason?: string) => Promise<Channel>\n syncGuildTemplate: (guildId: BigString) => Promise<Template>\n upsertGlobalApplicationCommands: (commands: CreateApplicationCommand[]) => Promise<ApplicationCommand[]>\n upsertGuildApplicationCommands: (guildId: BigString, commands: CreateApplicationCommand[]) => Promise<ApplicationCommand[]>\n editBotMember: (guildId: BigString, options: EditBotMemberOptions, reason?: string) => Promise<Member>\n editMember: (guildId: BigString, userId: BigString, options: ModifyGuildMember, reason?: string) => Promise<Member>\n getMember: (guildId: BigString, userId: BigString) => Promise<Member>\n getMembers: (guildId: BigString, options: ListGuildMembers) => Promise<Member[]>\n pruneMembers: (guildId: BigString, options: BeginGuildPrune, reason?: string) => Promise<{ pruned: number | null }>\n searchMembers: (guildId: BigString, query: string, options?: Omit<SearchMembers, 'query'>) => Promise<Member[]>\n}\n"],"names":["snakelize","createBotHelpers","bot","createAutomodRule","guildId","options","reason","transformers","automodRule","rest","createChannel","channel","createEmoji","emoji","createForumThread","channelId","createGlobalApplicationCommand","command","applicationCommand","createGuild","guild","shardId","createGuildApplicationCommand","createGuildFromTemplate","templateCode","createGuildSticker","sticker","createGuildTemplate","template","createInvite","createRole","role","createScheduledEvent","scheduledEvent","createStageInstance","stageInstance","createWebhook","webhook","editApplicationCommandPermissions","commandId","bearerToken","applicationCommandPermission","editAutomodRule","ruleId","editBotProfile","user","editChannel","editEmoji","id","editFollowupMessage","token","messageId","message","editGlobalApplicationCommand","editGuild","editGuildApplicationCommand","editGuildSticker","stickerId","editGuildTemplate","editMessage","editOriginalInteractionResponse","result","editOriginalWebhookMessage","webhookId","editRole","roleId","editRolePositions","map","editScheduledEvent","eventId","editStageInstance","topic","editWebhook","editWebhookMessage","editWebhookWithToken","editWelcomeScreen","welcomeScreen","editWidgetSettings","widgetSettings","executeWebhook","followAnnouncement","sourceChannelId","targetChannelId","getActiveThreads","getApplicationInfo","application","getApplicationCommandPermission","getApplicationCommandPermissions","res","getAuditLog","getAutomodRule","getAutomodRules","getAvailableVoiceRegions","voiceRegion","getBan","userId","getBans","getChannel","getChannelInvites","getChannels","getChannelWebhooks","getDmChannel","getEmoji","emojiId","getEmojis","getFollowupMessage","getGatewayBot","gatewayBot","getGlobalApplicationCommand","getGlobalApplicationCommands","getGuild","getGuildApplicationCommand","getGuildApplicationCommands","getGuildPreview","getGuildSticker","getGuildStickers","getGuildTemplate","getGuildTemplates","getGuildWebhooks","getIntegrations","integration","toString","getInvite","inviteCode","getInvites","getMessage","getMessages","getNitroStickerPacks","stickerPack","getOriginalInteractionResponse","getPinnedMessages","getPrivateArchivedThreads","getPrivateJoinedArchivedThreads","getPruneCount","getPublicArchivedThreads","getRoles","getScheduledEvent","getScheduledEvents","getScheduledEventUsers","u","member","snowflake","getSessionInfo","getStageInstance","getSticker","getThreadMember","threadMember","getThreadMembers","getReactions","reaction","getUser","getVanityUrl","getVoiceRegions","getWebhook","getWebhookMessage","getWebhookWithToken","getWelcomeScreen","getWidget","widget","getWidgetSettings","publishMessage","sendMessage","sendFollowupMessage","startThreadWithMessage","startThreadWithoutMessage","syncGuildTemplate","upsertGlobalApplicationCommands","commands","upsertGuildApplicationCommands","editBotMember","editMember","getMember","getMembers","pruneMembers","searchMembers","query"],"mappings":"AAiEA,SAASA,SAAS,QAAQ,oBAAmB;AAwB7C,OAAO,SAASC,iBAAiBC,GAAQ,EAAc;IACrD,OAAO;QACLC,mBAAmB,OAAOC,SAASC,SAASC,SAAW;YACrD,OAAOJ,IAAIK,YAAY,CAACC,WAAW,CAACN,KAAKF,UAA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2F,QAAQ1F,SAASC,UAAUF,SAAS2F;QACvH;QACA4E,WAAW,OAAOvK,SAAS2F,SAAW;YACpC,OAAO7F,IAAIK,YAAY,CAACqI,MAAM,CAAC1I,KAAKF,UAAU,MAAME,IAAIO,IAAI,CAACkK,SAAS,CAACvK,SAAS2F,UAAU3F,SAAS2F;QACrG;QACA6E,YAAY,OAAOxK,SAASC,UAAY;YACtC,OAAO,AAAC,CAAA,MAAMH,IAAIO,IAAI,CAACmK,UAAU,CAACxK,SAASC,QAAO,EAAG8D,GAAG,CAAC,CAACqB,MACxDtF,IAAIK,YAAY,CAACqI,MAAM,CAAC1I,KAAKF,UAAUwF,MAAMpF,SAASF,IAAIK,YAAY,CAACsI,SAAS,CAACrD,IAAI3C,IAAI,CAACG,EAAE;QAEhG;QACA6H,cAAc,OAAOzK,SAASC,SAASC,SAAW;YAChD,OAAO,MAAMJ,IAAIO,IAAI,CAACoK,YAAY,CAACzK,SAASC,SAASC;QACvD;QACAwK,eAAe,OAAO1K,SAAS2K,OAAO1K,UAAY;YAChD,OAAO,AAAC,CAAA,MAAMH,IAAIO,IAAI,CAACqK,aAAa,CAAC1K,SAAS2K,OAAO1K,QAAO,EAAG8D,GAAG,CAAC,CAACqB,MAClEtF,IAAIK,YAAY,CAACqI,MAAM,CAAC1I,KAAKF,UAAUwF,MAAMpF,SAASF,IAAIK,YAAY,CAACsI,SAAS,CAACrD,IAAI3C,IAAI,CAACG,EAAE;QAEhG;IACF;AACF,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,9 +3,13 @@ export * from '@discordeno/rest';
|
|
|
3
3
|
export * from '@discordeno/types';
|
|
4
4
|
export * from '@discordeno/utils';
|
|
5
5
|
export * from './bot.js';
|
|
6
|
+
export * from './constants.js';
|
|
6
7
|
export * from './handlers/index.js';
|
|
7
8
|
export * from './handlers.js';
|
|
9
|
+
export * from './helpers.js';
|
|
10
|
+
export * from './optionalize.js';
|
|
8
11
|
export * from './transformers/index.js';
|
|
9
12
|
export * from './transformers.js';
|
|
13
|
+
export * from './typings.js';
|
|
10
14
|
export * from './utils.js';
|
|
11
15
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,UAAU,CAAA;AACxB,cAAc,qBAAqB,CAAA;AACnC,cAAc,eAAe,CAAA;AAC7B,cAAc,yBAAyB,CAAA;AACvC,cAAc,mBAAmB,CAAA;AACjC,cAAc,YAAY,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,UAAU,CAAA;AACxB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA;AACnC,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,yBAAyB,CAAA;AACvC,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -3,10 +3,14 @@ export * from '@discordeno/rest';
|
|
|
3
3
|
export * from '@discordeno/types';
|
|
4
4
|
export * from '@discordeno/utils';
|
|
5
5
|
export * from './bot.js';
|
|
6
|
+
export * from './constants.js';
|
|
6
7
|
export * from './handlers/index.js';
|
|
7
8
|
export * from './handlers.js';
|
|
9
|
+
export * from './helpers.js';
|
|
10
|
+
export * from './optionalize.js';
|
|
8
11
|
export * from './transformers/index.js';
|
|
9
12
|
export * from './transformers.js';
|
|
13
|
+
export * from './typings.js';
|
|
10
14
|
export * from './utils.js';
|
|
11
15
|
|
|
12
16
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from '@discordeno/gateway'\nexport * from '@discordeno/rest'\nexport * from '@discordeno/types'\nexport * from '@discordeno/utils'\nexport * from './bot.js'\nexport * from './handlers/index.js'\nexport * from './handlers.js'\nexport * from './transformers/index.js'\nexport * from './transformers.js'\nexport * from './utils.js'\n"],"names":[],"mappings":"AAAA,cAAc,sBAAqB;AACnC,cAAc,mBAAkB;AAChC,cAAc,oBAAmB;AACjC,cAAc,oBAAmB;AACjC,cAAc,WAAU;AACxB,cAAc,sBAAqB;AACnC,cAAc,gBAAe;AAC7B,cAAc,0BAAyB;AACvC,cAAc,oBAAmB;AACjC,cAAc,aAAY"}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from '@discordeno/gateway'\nexport * from '@discordeno/rest'\nexport * from '@discordeno/types'\nexport * from '@discordeno/utils'\nexport * from './bot.js'\nexport * from './constants.js'\nexport * from './handlers/index.js'\nexport * from './handlers.js'\nexport * from './helpers.js'\nexport * from './optionalize.js'\nexport * from './transformers/index.js'\nexport * from './transformers.js'\nexport * from './typings.js'\nexport * from './utils.js'\n"],"names":[],"mappings":"AAAA,cAAc,sBAAqB;AACnC,cAAc,mBAAkB;AAChC,cAAc,oBAAmB;AACjC,cAAc,oBAAmB;AACjC,cAAc,WAAU;AACxB,cAAc,iBAAgB;AAC9B,cAAc,sBAAqB;AACnC,cAAc,gBAAe;AAC7B,cAAc,eAAc;AAC5B,cAAc,mBAAkB;AAChC,cAAc,0BAAyB;AACvC,cAAc,oBAAmB;AACjC,cAAc,eAAc;AAC5B,cAAc,aAAY"}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import type { Bot, DiscordActivity } from '../index.js';
|
|
2
2
|
export declare function transformActivity(bot: Bot, payload: DiscordActivity): {
|
|
3
3
|
join?: string | undefined;
|
|
4
|
-
|
|
5
|
-
url?: string | undefined;
|
|
6
|
-
startedAt?: number | undefined;
|
|
7
|
-
endedAt?: number | undefined;
|
|
4
|
+
flags?: number | undefined;
|
|
8
5
|
applicationId?: bigint | undefined;
|
|
9
|
-
|
|
10
|
-
state?: string | undefined;
|
|
6
|
+
url?: string | undefined;
|
|
11
7
|
emoji?: {
|
|
12
8
|
id?: bigint | undefined;
|
|
13
9
|
animated?: boolean | undefined;
|
|
14
10
|
name: string;
|
|
15
11
|
} | undefined;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
partyMaxSize?: number | undefined;
|
|
19
|
-
largeImage?: string | undefined;
|
|
20
|
-
largeText?: string | undefined;
|
|
21
|
-
smallImage?: string | undefined;
|
|
22
|
-
smallText?: string | undefined;
|
|
23
|
-
match?: string | undefined;
|
|
12
|
+
details?: string | undefined;
|
|
13
|
+
state?: string | undefined;
|
|
24
14
|
instance?: boolean | undefined;
|
|
25
|
-
flags?: number | undefined;
|
|
26
15
|
buttons?: {
|
|
27
16
|
url: string;
|
|
28
17
|
label: string;
|
|
29
18
|
}[] | undefined;
|
|
19
|
+
largeText?: string | undefined;
|
|
20
|
+
smallText?: string | undefined;
|
|
21
|
+
largeImage?: string | undefined;
|
|
22
|
+
smallImage?: string | undefined;
|
|
23
|
+
spectate?: string | undefined;
|
|
24
|
+
match?: string | undefined;
|
|
25
|
+
partyId?: string | undefined;
|
|
26
|
+
startedAt?: number | undefined;
|
|
27
|
+
endedAt?: number | undefined;
|
|
28
|
+
partyCurrentSize?: number | undefined;
|
|
29
|
+
partyMaxSize?: number | undefined;
|
|
30
30
|
name: string;
|
|
31
31
|
type: import("@discordeno/types/dist/shared.js").ActivityTypes;
|
|
32
32
|
createdAt: number;
|