@jubbio/core 1.1.20 → 1.3.2

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.
Files changed (125) hide show
  1. package/dist/Client.js +13 -14
  2. package/dist/cjs/Client.d.ts +157 -0
  3. package/dist/cjs/Client.js +640 -0
  4. package/dist/cjs/builders/ActionRowBuilder.d.ts +53 -0
  5. package/dist/cjs/builders/ActionRowBuilder.js +68 -0
  6. package/dist/cjs/builders/ButtonBuilder.d.ts +77 -0
  7. package/dist/cjs/builders/ButtonBuilder.js +96 -0
  8. package/dist/cjs/builders/EmbedBuilder.d.ts +157 -0
  9. package/dist/cjs/builders/EmbedBuilder.js +208 -0
  10. package/dist/cjs/builders/ModalBuilder.d.ts +122 -0
  11. package/dist/cjs/builders/ModalBuilder.js +162 -0
  12. package/dist/cjs/builders/SelectMenuBuilder.d.ts +123 -0
  13. package/dist/cjs/builders/SelectMenuBuilder.js +165 -0
  14. package/dist/cjs/builders/SlashCommandBuilder.d.ts +197 -0
  15. package/dist/cjs/builders/SlashCommandBuilder.js +324 -0
  16. package/dist/cjs/builders/index.d.ts +9 -0
  17. package/dist/cjs/builders/index.js +26 -0
  18. package/dist/cjs/enums.d.ts +191 -0
  19. package/dist/cjs/enums.js +211 -0
  20. package/dist/cjs/index.d.ts +25 -0
  21. package/dist/cjs/index.js +130 -0
  22. package/dist/cjs/managers/BaseManager.d.ts +69 -0
  23. package/dist/cjs/managers/BaseManager.js +106 -0
  24. package/dist/cjs/managers/ChannelManager.d.ts +95 -0
  25. package/dist/cjs/managers/ChannelManager.js +205 -0
  26. package/dist/cjs/managers/GuildMemberManager.d.ts +74 -0
  27. package/dist/cjs/managers/GuildMemberManager.js +157 -0
  28. package/dist/cjs/managers/RoleManager.d.ts +84 -0
  29. package/dist/cjs/managers/RoleManager.js +207 -0
  30. package/dist/cjs/managers/index.d.ts +7 -0
  31. package/dist/cjs/managers/index.js +24 -0
  32. package/dist/cjs/rest/REST.d.ts +527 -0
  33. package/dist/cjs/rest/REST.js +904 -0
  34. package/dist/cjs/rest/index.d.ts +1 -0
  35. package/dist/cjs/rest/index.js +18 -0
  36. package/dist/cjs/sharding/ShardingManager.d.ts +179 -0
  37. package/dist/cjs/sharding/ShardingManager.js +375 -0
  38. package/dist/cjs/sharding/index.d.ts +4 -0
  39. package/dist/cjs/sharding/index.js +21 -0
  40. package/dist/cjs/structures/Channel.d.ts +122 -0
  41. package/dist/cjs/structures/Channel.js +240 -0
  42. package/dist/cjs/structures/Collection.d.ts +53 -0
  43. package/dist/cjs/structures/Collection.js +115 -0
  44. package/dist/cjs/structures/Guild.d.ts +59 -0
  45. package/dist/cjs/structures/Guild.js +94 -0
  46. package/dist/cjs/structures/GuildMember.d.ts +174 -0
  47. package/dist/cjs/structures/GuildMember.js +311 -0
  48. package/dist/cjs/structures/Interaction.d.ts +245 -0
  49. package/dist/cjs/structures/Interaction.js +450 -0
  50. package/dist/cjs/structures/Message.d.ts +98 -0
  51. package/dist/cjs/structures/Message.js +195 -0
  52. package/dist/cjs/structures/User.d.ts +37 -0
  53. package/dist/cjs/structures/User.js +65 -0
  54. package/dist/cjs/structures/index.d.ts +7 -0
  55. package/dist/cjs/structures/index.js +25 -0
  56. package/dist/cjs/structures.d.ts +1 -0
  57. package/dist/cjs/structures.js +19 -0
  58. package/dist/cjs/types.d.ts +255 -0
  59. package/dist/cjs/types.js +3 -0
  60. package/dist/cjs/utils/BitField.d.ts +66 -0
  61. package/dist/cjs/utils/BitField.js +138 -0
  62. package/dist/cjs/utils/Collection.d.ts +116 -0
  63. package/dist/cjs/utils/Collection.js +265 -0
  64. package/dist/cjs/utils/Collector.d.ts +152 -0
  65. package/dist/cjs/utils/Collector.js +314 -0
  66. package/dist/cjs/utils/DataResolver.d.ts +61 -0
  67. package/dist/cjs/utils/DataResolver.js +146 -0
  68. package/dist/cjs/utils/Formatters.d.ts +145 -0
  69. package/dist/cjs/utils/Formatters.js +213 -0
  70. package/dist/cjs/utils/IntentsBitField.d.ts +85 -0
  71. package/dist/cjs/utils/IntentsBitField.js +99 -0
  72. package/dist/cjs/utils/Partials.d.ts +104 -0
  73. package/dist/cjs/utils/Partials.js +148 -0
  74. package/dist/cjs/utils/PermissionsBitField.d.ts +118 -0
  75. package/dist/cjs/utils/PermissionsBitField.js +145 -0
  76. package/dist/cjs/utils/SnowflakeUtil.d.ts +63 -0
  77. package/dist/cjs/utils/SnowflakeUtil.js +93 -0
  78. package/dist/cjs/utils/Sweepers.d.ts +119 -0
  79. package/dist/cjs/utils/Sweepers.js +249 -0
  80. package/dist/cjs/utils/index.d.ts +13 -0
  81. package/dist/cjs/utils/index.js +30 -0
  82. package/dist/esm/Client.js +634 -0
  83. package/dist/esm/builders/ActionRowBuilder.js +64 -0
  84. package/dist/esm/builders/ButtonBuilder.js +92 -0
  85. package/dist/esm/builders/EmbedBuilder.js +204 -0
  86. package/dist/esm/builders/ModalBuilder.js +157 -0
  87. package/dist/esm/builders/SelectMenuBuilder.js +161 -0
  88. package/dist/esm/builders/SlashCommandBuilder.js +311 -0
  89. package/dist/esm/builders/index.js +10 -0
  90. package/dist/esm/enums.js +208 -0
  91. package/dist/esm/index.js +34 -0
  92. package/dist/esm/managers/BaseManager.js +100 -0
  93. package/dist/esm/managers/ChannelManager.js +200 -0
  94. package/dist/esm/managers/GuildMemberManager.js +153 -0
  95. package/dist/esm/managers/RoleManager.js +203 -0
  96. package/dist/esm/managers/index.js +8 -0
  97. package/dist/esm/rest/REST.js +900 -0
  98. package/dist/esm/rest/index.js +2 -0
  99. package/dist/esm/sharding/ShardingManager.js +366 -0
  100. package/dist/esm/sharding/index.js +5 -0
  101. package/dist/esm/structures/Channel.js +232 -0
  102. package/dist/esm/structures/Collection.js +111 -0
  103. package/dist/esm/structures/Guild.js +90 -0
  104. package/dist/esm/structures/GuildMember.js +306 -0
  105. package/dist/esm/structures/Interaction.js +438 -0
  106. package/dist/esm/structures/Message.js +191 -0
  107. package/dist/esm/structures/User.js +61 -0
  108. package/dist/esm/structures/index.js +9 -0
  109. package/dist/esm/structures.js +3 -0
  110. package/dist/esm/types.js +2 -0
  111. package/dist/esm/utils/BitField.js +134 -0
  112. package/dist/esm/utils/Collection.js +261 -0
  113. package/dist/esm/utils/Collector.js +305 -0
  114. package/dist/esm/utils/DataResolver.js +142 -0
  115. package/dist/esm/utils/Formatters.js +191 -0
  116. package/dist/esm/utils/IntentsBitField.js +93 -0
  117. package/dist/esm/utils/Partials.js +137 -0
  118. package/dist/esm/utils/PermissionsBitField.js +141 -0
  119. package/dist/esm/utils/SnowflakeUtil.js +89 -0
  120. package/dist/esm/utils/Sweepers.js +245 -0
  121. package/dist/esm/utils/index.js +14 -0
  122. package/dist/rest/REST.js +8 -1
  123. package/dist/structures/Interaction.js +3 -5
  124. package/dist/structures/Message.js +56 -2
  125. package/package.json +14 -4
@@ -0,0 +1,527 @@
1
+ import { APIMessage, APIApplicationCommand, APIEmbed } from '../types';
2
+ /**
3
+ * Mention data structure for our system
4
+ */
5
+ export interface MentionUser {
6
+ id: number;
7
+ username: string;
8
+ }
9
+ export interface MentionRole {
10
+ id: string;
11
+ name?: string;
12
+ }
13
+ export interface MentionsData {
14
+ users?: MentionUser[];
15
+ roles?: MentionRole[];
16
+ everyone?: boolean;
17
+ }
18
+ /**
19
+ * User cache entry
20
+ */
21
+ interface CachedUser {
22
+ id: number;
23
+ username: string;
24
+ displayName?: string;
25
+ cachedAt: number;
26
+ }
27
+ /**
28
+ * REST API client for Jubbio
29
+ */
30
+ export declare class REST {
31
+ private baseUrl;
32
+ private token;
33
+ private userCache;
34
+ private readonly USER_CACHE_TTL;
35
+ constructor(baseUrl?: string);
36
+ /**
37
+ * Cache a user for mention resolution
38
+ * Bot'lar interaction'dan gelen user bilgisini cache'leyebilir
39
+ */
40
+ cacheUser(user: {
41
+ id: string | number;
42
+ username: string;
43
+ displayName?: string;
44
+ display_name?: string;
45
+ }): void;
46
+ /**
47
+ * Cache multiple users
48
+ */
49
+ cacheUsers(users: Array<{
50
+ id: string | number;
51
+ username: string;
52
+ displayName?: string;
53
+ display_name?: string;
54
+ }>): void;
55
+ /**
56
+ * Get cached user by ID
57
+ */
58
+ getCachedUser(userId: number): CachedUser | undefined;
59
+ /**
60
+ * Format a user mention
61
+ * Returns both the text format and mentions data
62
+ *
63
+ * @example
64
+ * const mention = rest.formatMention(user);
65
+ * // mention.text = "<@1>"
66
+ * // mention.data = { users: [{ id: 1, username: "ilkay" }] }
67
+ */
68
+ formatMention(user: {
69
+ id: string | number;
70
+ username: string;
71
+ }): {
72
+ text: string;
73
+ data: MentionsData;
74
+ };
75
+ /**
76
+ * Parse mentions (<@ID>) in content and build mentions data structure
77
+ * Content is kept as-is with <@ID> format (client renders them)
78
+ *
79
+ * @param content - Message content with mentions
80
+ * @param existingMentions - Existing mentions data to merge with
81
+ * @returns Original content and mentions data
82
+ */
83
+ private processMentions;
84
+ /**
85
+ * Prepare message data with processed mentions
86
+ * Automatically converts mentions to our format
87
+ */
88
+ private prepareMessageData;
89
+ /**
90
+ * Set the bot token
91
+ */
92
+ setToken(token: string): this;
93
+ /**
94
+ * Make an authenticated request
95
+ */
96
+ private request;
97
+ /**
98
+ * Create a message in a channel
99
+ * Mentions use <@ID> format and are kept as-is (client renders them)
100
+ *
101
+ * @example
102
+ * await rest.createMessage(guildId, channelId, {
103
+ * content: 'Hello <@123>!',
104
+ * });
105
+ */
106
+ createMessage(guildIdOrChannelId: string, channelIdOrData: string | {
107
+ content?: string;
108
+ embeds?: APIEmbed[];
109
+ components?: any[];
110
+ mentions?: MentionsData;
111
+ files?: Array<{
112
+ name: string;
113
+ data: Buffer;
114
+ }>;
115
+ message_reference?: {
116
+ message_id: string;
117
+ };
118
+ interactionId?: string;
119
+ }, data?: {
120
+ content?: string;
121
+ embeds?: APIEmbed[];
122
+ components?: any[];
123
+ mentions?: MentionsData;
124
+ files?: Array<{
125
+ name: string;
126
+ data: Buffer;
127
+ }>;
128
+ message_reference?: {
129
+ message_id: string;
130
+ };
131
+ interactionId?: string;
132
+ }): Promise<APIMessage>;
133
+ /**
134
+ * Create an ephemeral message that is only visible to a specific user
135
+ * Ephemeral messages are NOT saved to database - they are only sent via WebSocket
136
+ *
137
+ * @example
138
+ * // Send a warning only visible to the user
139
+ * await rest.createEphemeralMessage(guildId, channelId, targetUserId, {
140
+ * embeds: [warningEmbed]
141
+ * });
142
+ */
143
+ createEphemeralMessage(guildId: string, channelId: string, targetUserId: string | number, data: {
144
+ content?: string;
145
+ embeds?: APIEmbed[];
146
+ components?: any[];
147
+ }): Promise<{
148
+ id: string;
149
+ ephemeral: boolean;
150
+ flags: number;
151
+ }>;
152
+ /**
153
+ * Create a DM message
154
+ */
155
+ createDMMessage(channelId: string, data: {
156
+ content?: string;
157
+ embeds?: APIEmbed[];
158
+ }): Promise<APIMessage>;
159
+ /**
160
+ * Edit a message
161
+ * Automatically processes mentions
162
+ */
163
+ editMessage(guildId: string, channelId: string, messageId: string, data: {
164
+ content?: string;
165
+ embeds?: APIEmbed[];
166
+ components?: any[];
167
+ mentions?: MentionsData;
168
+ }): Promise<APIMessage>;
169
+ /**
170
+ * Delete a message
171
+ */
172
+ deleteMessage(guildId: string, channelId: string, messageId: string): Promise<void>;
173
+ /**
174
+ * Validate and normalize emoji format for the API.
175
+ * Accepted formats: :name:, <:name:id>, <a:name:id>
176
+ * Unicode emoji characters (👍) are NOT supported.
177
+ */
178
+ private validateEmoji;
179
+ /**
180
+ * Add a reaction to a message
181
+ * @param emoji - Emoji in :name:, <:name:id>, or <a:name:id> format. Unicode characters (👍) are not supported.
182
+ */
183
+ addReaction(guildId: string, channelId: string, messageId: string, emoji: string): Promise<void>;
184
+ /**
185
+ * Remove a reaction from a message
186
+ * @param emoji - Emoji in :name:, <:name:id>, or <a:name:id> format. Unicode characters (👍) are not supported.
187
+ */
188
+ removeReaction(guildId: string, channelId: string, messageId: string, emoji: string): Promise<void>;
189
+ /**
190
+ * Upload an attachment to a channel
191
+ */
192
+ uploadAttachment(guildId: string, channelId: string, file: {
193
+ name: string;
194
+ data: Buffer;
195
+ contentType?: string;
196
+ }): Promise<{
197
+ id: string;
198
+ url: string;
199
+ filename: string;
200
+ }>;
201
+ /**
202
+ * Create a message with a file attachment
203
+ */
204
+ createMessageWithFile(guildId: string, channelId: string, data: {
205
+ content?: string;
206
+ file: {
207
+ name: string;
208
+ data: Buffer;
209
+ contentType?: string;
210
+ };
211
+ interactionId?: string;
212
+ }): Promise<APIMessage>;
213
+ /**
214
+ * Create an interaction response
215
+ * Automatically processes mentions in content and embeds
216
+ */
217
+ createInteractionResponse(interactionId: string, token: string, data: {
218
+ type: number;
219
+ data?: any;
220
+ }): Promise<void>;
221
+ /**
222
+ * Edit the original interaction response
223
+ * If files are provided, creates a new message with files (since webhook edit doesn't support file upload)
224
+ * Automatically processes mentions
225
+ */
226
+ editInteractionResponse(token: string, data: {
227
+ content?: string;
228
+ embeds?: APIEmbed[];
229
+ components?: any[];
230
+ mentions?: MentionsData;
231
+ files?: Array<{
232
+ name: string;
233
+ data: Buffer;
234
+ contentType?: string;
235
+ }>;
236
+ }, guildId?: string, channelId?: string, interactionId?: string): Promise<void>;
237
+ /**
238
+ * Delete the original interaction response
239
+ */
240
+ deleteInteractionResponse(token: string): Promise<void>;
241
+ /**
242
+ * Create a followup message
243
+ * Automatically processes mentions
244
+ */
245
+ createFollowup(token: string, data: {
246
+ content?: string;
247
+ embeds?: APIEmbed[];
248
+ mentions?: MentionsData;
249
+ flags?: number;
250
+ }): Promise<void>;
251
+ /**
252
+ * Register global application commands
253
+ */
254
+ registerGlobalCommands(commands: APIApplicationCommand[]): Promise<void>;
255
+ /**
256
+ * Register guild-specific commands
257
+ */
258
+ registerGuildCommands(guildId: string, commands: APIApplicationCommand[]): Promise<void>;
259
+ /**
260
+ * Delete a global command
261
+ */
262
+ deleteGlobalCommand(commandId: string): Promise<void>;
263
+ /**
264
+ * Delete a guild-specific command
265
+ */
266
+ deleteGuildCommand(guildId: string, commandId: string): Promise<void>;
267
+ /**
268
+ * List all global commands for this application
269
+ */
270
+ listGlobalCommands(): Promise<APIApplicationCommand[]>;
271
+ /**
272
+ * List all guild-specific commands for this application
273
+ */
274
+ listGuildCommands(guildId: string): Promise<APIApplicationCommand[]>;
275
+ /**
276
+ * Get a specific global command
277
+ */
278
+ getGlobalCommand(commandId: string): Promise<APIApplicationCommand>;
279
+ /**
280
+ * Get a specific guild command
281
+ */
282
+ getGuildCommand(guildId: string, commandId: string): Promise<APIApplicationCommand>;
283
+ /**
284
+ * Update a global command
285
+ */
286
+ updateGlobalCommand(commandId: string, data: Partial<APIApplicationCommand>): Promise<APIApplicationCommand>;
287
+ /**
288
+ * Update a guild-specific command
289
+ */
290
+ updateGuildCommand(guildId: string, commandId: string, data: Partial<APIApplicationCommand>): Promise<APIApplicationCommand>;
291
+ private applicationId;
292
+ /**
293
+ * Set the application ID
294
+ */
295
+ setApplicationId(id: string): void;
296
+ /**
297
+ * Get the application ID
298
+ */
299
+ private getApplicationId;
300
+ /**
301
+ * Create a channel in a guild
302
+ */
303
+ createChannel(guildId: string, data: {
304
+ name: string;
305
+ type?: number;
306
+ parent_id?: string | null;
307
+ category_id?: string | null;
308
+ permission_overwrites?: Array<{
309
+ id: string;
310
+ type: number;
311
+ allow?: string;
312
+ deny?: string;
313
+ }>;
314
+ }): Promise<{
315
+ id: string;
316
+ name: string;
317
+ }>;
318
+ /**
319
+ * Delete a channel
320
+ */
321
+ /**
322
+ * Delete a channel
323
+ */
324
+ deleteChannel(guildId: string, channelId: string): Promise<void>;
325
+ /**
326
+ * Delete a category
327
+ */
328
+ deleteCategory(guildId: string, categoryId: string): Promise<void>;
329
+ /**
330
+ * Edit channel permission overwrites
331
+ */
332
+ editChannelPermissions(channelId: string, overwriteId: string, data: {
333
+ type: number;
334
+ allow?: string;
335
+ deny?: string;
336
+ }): Promise<void>;
337
+ /**
338
+ * Delete channel permission overwrite
339
+ */
340
+ deleteChannelPermission(channelId: string, overwriteId: string): Promise<void>;
341
+ /**
342
+ * Get messages from a channel
343
+ */
344
+ getMessages(guildId: string, channelId: string, options?: {
345
+ limit?: number;
346
+ before?: string;
347
+ after?: string;
348
+ }): Promise<APIMessage[]>;
349
+ /**
350
+ * Get a guild member
351
+ */
352
+ getMember(guildId: string, userId: string): Promise<any>;
353
+ /**
354
+ * Timeout a guild member
355
+ */
356
+ timeoutMember(guildId: string, userId: string, duration: number | null, reason?: string): Promise<void>;
357
+ /**
358
+ * Kick a guild member
359
+ */
360
+ kickMember(guildId: string, userId: string, reason?: string): Promise<void>;
361
+ /**
362
+ * Ban a guild member
363
+ */
364
+ banMember(guildId: string, userId: string, options?: {
365
+ deleteMessageDays?: number;
366
+ deleteMessageSeconds?: number;
367
+ reason?: string;
368
+ }): Promise<void>;
369
+ /**
370
+ * Unban a user
371
+ */
372
+ unbanMember(guildId: string, userId: string, reason?: string): Promise<void>;
373
+ /**
374
+ * Edit a guild member
375
+ */
376
+ editMember(guildId: string, userId: string, data: {
377
+ nick?: string | null;
378
+ roles?: string[];
379
+ mute?: boolean;
380
+ deaf?: boolean;
381
+ channel_id?: string | null;
382
+ communication_disabled_until?: string | null;
383
+ reason?: string;
384
+ }): Promise<any>;
385
+ /**
386
+ * Add a role to a member
387
+ */
388
+ addMemberRole(guildId: string, userId: string, roleId: string, reason?: string): Promise<void>;
389
+ /**
390
+ * Remove a role from a member
391
+ */
392
+ removeMemberRole(guildId: string, userId: string, roleId: string, reason?: string): Promise<void>;
393
+ /**
394
+ * Bulk assign roles to members
395
+ */
396
+ bulkAssignRoles(guildId: string, assignments: {
397
+ user_id: string;
398
+ role_ids: string[];
399
+ }[]): Promise<any>;
400
+ /**
401
+ * Bulk remove roles from members
402
+ */
403
+ bulkRemoveRoles(guildId: string, removals: {
404
+ user_id: string;
405
+ role_ids: string[];
406
+ }[]): Promise<any>;
407
+ /**
408
+ * Bulk delete messages
409
+ */
410
+ bulkDeleteMessages(guildId: string, channelId: string, messageIds: string[]): Promise<void>;
411
+ /**
412
+ * Get a guild
413
+ */
414
+ getGuild(guildId: string): Promise<any>;
415
+ /**
416
+ * Get guild channels
417
+ */
418
+ getGuildChannels(guildId: string): Promise<any[]>;
419
+ /**
420
+ * Get guild roles
421
+ */
422
+ getRoles(guildId: string): Promise<any[]>;
423
+ /**
424
+ * Create a role
425
+ */
426
+ createRole(guildId: string, data: {
427
+ name?: string;
428
+ color?: number;
429
+ hoist?: boolean;
430
+ mentionable?: boolean;
431
+ permissions?: string;
432
+ }): Promise<any>;
433
+ /**
434
+ * Edit a role
435
+ */
436
+ editRole(guildId: string, roleId: string, data: {
437
+ name?: string;
438
+ color?: number;
439
+ hoist?: boolean;
440
+ mentionable?: boolean;
441
+ permissions?: string;
442
+ }): Promise<any>;
443
+ /**
444
+ * Delete a role
445
+ */
446
+ deleteRole(guildId: string, roleId: string): Promise<void>;
447
+ /**
448
+ * Get guild emojis
449
+ */
450
+ getEmojis(guildId: string): Promise<any[]>;
451
+ /**
452
+ * Get guild bans
453
+ */
454
+ getBans(guildId: string): Promise<any[]>;
455
+ /**
456
+ * Get a specific ban
457
+ */
458
+ getBan(guildId: string, userId: string): Promise<any>;
459
+ /**
460
+ * Get guild invites
461
+ */
462
+ getGuildInvites(guildId: string): Promise<any[]>;
463
+ /**
464
+ * Pin a message
465
+ */
466
+ pinMessage(guildId: string, channelId: string, messageId: string): Promise<void>;
467
+ /**
468
+ * Unpin a message
469
+ */
470
+ unpinMessage(guildId: string, channelId: string, messageId: string): Promise<void>;
471
+ /**
472
+ * Get pinned messages
473
+ */
474
+ getPinnedMessages(guildId: string, channelId: string): Promise<APIMessage[]>;
475
+ /**
476
+ * Get a user
477
+ */
478
+ getUser(userId: string): Promise<any>;
479
+ /**
480
+ * Get current bot user
481
+ */
482
+ getCurrentUser(): Promise<any>;
483
+ /**
484
+ * Create an invite
485
+ */
486
+ createInvite(guildId: string, channelId: string, data?: {
487
+ max_age?: number;
488
+ max_uses?: number;
489
+ temporary?: boolean;
490
+ unique?: boolean;
491
+ }): Promise<any>;
492
+ /**
493
+ * Delete an invite
494
+ */
495
+ deleteInvite(inviteCode: string): Promise<void>;
496
+ /**
497
+ * Get an invite
498
+ */
499
+ getInvite(inviteCode: string): Promise<any>;
500
+ /**
501
+ * Get channel webhooks
502
+ */
503
+ getChannelWebhooks(guildId: string, channelId: string): Promise<any[]>;
504
+ /**
505
+ * Get guild webhooks
506
+ */
507
+ getGuildWebhooks(guildId: string): Promise<any[]>;
508
+ /**
509
+ * Create a webhook
510
+ */
511
+ createWebhook(guildId: string, channelId: string, data: {
512
+ name: string;
513
+ avatar?: string;
514
+ }): Promise<any>;
515
+ /**
516
+ * Update a webhook
517
+ */
518
+ updateWebhook(guildId: string, webhookId: string, data: {
519
+ name?: string;
520
+ avatar_url?: string;
521
+ }): Promise<any>;
522
+ /**
523
+ * Delete a webhook
524
+ */
525
+ deleteWebhook(guildId: string, webhookId: string): Promise<void>;
526
+ }
527
+ export {};