@jubbio/core 1.3.3 → 1.3.5

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 (131) hide show
  1. package/dist/Client.js +50 -10
  2. package/dist/rest/REST.d.ts +1 -0
  3. package/dist/rest/REST.js +1 -1
  4. package/dist/structures/Channel.d.ts +1 -1
  5. package/dist/structures/Channel.js +11 -4
  6. package/dist/structures/Guild.d.ts +1 -1
  7. package/dist/structures/Guild.js +7 -3
  8. package/dist/structures/Interaction.js +11 -3
  9. package/dist/structures/Message.d.ts +2 -0
  10. package/dist/structures/Message.js +13 -33
  11. package/package.json +4 -14
  12. package/dist/cjs/Client.d.ts +0 -157
  13. package/dist/cjs/Client.js +0 -640
  14. package/dist/cjs/builders/ActionRowBuilder.d.ts +0 -53
  15. package/dist/cjs/builders/ActionRowBuilder.js +0 -68
  16. package/dist/cjs/builders/ButtonBuilder.d.ts +0 -77
  17. package/dist/cjs/builders/ButtonBuilder.js +0 -96
  18. package/dist/cjs/builders/EmbedBuilder.d.ts +0 -157
  19. package/dist/cjs/builders/EmbedBuilder.js +0 -208
  20. package/dist/cjs/builders/ModalBuilder.d.ts +0 -122
  21. package/dist/cjs/builders/ModalBuilder.js +0 -162
  22. package/dist/cjs/builders/SelectMenuBuilder.d.ts +0 -123
  23. package/dist/cjs/builders/SelectMenuBuilder.js +0 -165
  24. package/dist/cjs/builders/SlashCommandBuilder.d.ts +0 -197
  25. package/dist/cjs/builders/SlashCommandBuilder.js +0 -324
  26. package/dist/cjs/builders/index.d.ts +0 -9
  27. package/dist/cjs/builders/index.js +0 -26
  28. package/dist/cjs/enums.d.ts +0 -191
  29. package/dist/cjs/enums.js +0 -211
  30. package/dist/cjs/index.d.ts +0 -25
  31. package/dist/cjs/index.js +0 -130
  32. package/dist/cjs/managers/BaseManager.d.ts +0 -69
  33. package/dist/cjs/managers/BaseManager.js +0 -106
  34. package/dist/cjs/managers/ChannelManager.d.ts +0 -95
  35. package/dist/cjs/managers/ChannelManager.js +0 -205
  36. package/dist/cjs/managers/GuildMemberManager.d.ts +0 -74
  37. package/dist/cjs/managers/GuildMemberManager.js +0 -157
  38. package/dist/cjs/managers/RoleManager.d.ts +0 -84
  39. package/dist/cjs/managers/RoleManager.js +0 -207
  40. package/dist/cjs/managers/index.d.ts +0 -7
  41. package/dist/cjs/managers/index.js +0 -24
  42. package/dist/cjs/rest/REST.d.ts +0 -527
  43. package/dist/cjs/rest/REST.js +0 -904
  44. package/dist/cjs/rest/index.d.ts +0 -1
  45. package/dist/cjs/rest/index.js +0 -18
  46. package/dist/cjs/sharding/ShardingManager.d.ts +0 -179
  47. package/dist/cjs/sharding/ShardingManager.js +0 -375
  48. package/dist/cjs/sharding/index.d.ts +0 -4
  49. package/dist/cjs/sharding/index.js +0 -21
  50. package/dist/cjs/structures/Channel.d.ts +0 -122
  51. package/dist/cjs/structures/Channel.js +0 -240
  52. package/dist/cjs/structures/Collection.d.ts +0 -53
  53. package/dist/cjs/structures/Collection.js +0 -115
  54. package/dist/cjs/structures/Guild.d.ts +0 -59
  55. package/dist/cjs/structures/Guild.js +0 -94
  56. package/dist/cjs/structures/GuildMember.d.ts +0 -174
  57. package/dist/cjs/structures/GuildMember.js +0 -311
  58. package/dist/cjs/structures/Interaction.d.ts +0 -245
  59. package/dist/cjs/structures/Interaction.js +0 -450
  60. package/dist/cjs/structures/Message.d.ts +0 -98
  61. package/dist/cjs/structures/Message.js +0 -195
  62. package/dist/cjs/structures/User.d.ts +0 -37
  63. package/dist/cjs/structures/User.js +0 -65
  64. package/dist/cjs/structures/index.d.ts +0 -7
  65. package/dist/cjs/structures/index.js +0 -25
  66. package/dist/cjs/structures.d.ts +0 -1
  67. package/dist/cjs/structures.js +0 -19
  68. package/dist/cjs/types.d.ts +0 -255
  69. package/dist/cjs/types.js +0 -3
  70. package/dist/cjs/utils/BitField.d.ts +0 -66
  71. package/dist/cjs/utils/BitField.js +0 -138
  72. package/dist/cjs/utils/Collection.d.ts +0 -116
  73. package/dist/cjs/utils/Collection.js +0 -265
  74. package/dist/cjs/utils/Collector.d.ts +0 -152
  75. package/dist/cjs/utils/Collector.js +0 -314
  76. package/dist/cjs/utils/DataResolver.d.ts +0 -61
  77. package/dist/cjs/utils/DataResolver.js +0 -146
  78. package/dist/cjs/utils/Formatters.d.ts +0 -145
  79. package/dist/cjs/utils/Formatters.js +0 -213
  80. package/dist/cjs/utils/IntentsBitField.d.ts +0 -85
  81. package/dist/cjs/utils/IntentsBitField.js +0 -99
  82. package/dist/cjs/utils/Partials.d.ts +0 -104
  83. package/dist/cjs/utils/Partials.js +0 -148
  84. package/dist/cjs/utils/PermissionsBitField.d.ts +0 -118
  85. package/dist/cjs/utils/PermissionsBitField.js +0 -145
  86. package/dist/cjs/utils/SnowflakeUtil.d.ts +0 -63
  87. package/dist/cjs/utils/SnowflakeUtil.js +0 -93
  88. package/dist/cjs/utils/Sweepers.d.ts +0 -119
  89. package/dist/cjs/utils/Sweepers.js +0 -249
  90. package/dist/cjs/utils/index.d.ts +0 -13
  91. package/dist/cjs/utils/index.js +0 -30
  92. package/dist/esm/Client.js +0 -634
  93. package/dist/esm/builders/ActionRowBuilder.js +0 -64
  94. package/dist/esm/builders/ButtonBuilder.js +0 -92
  95. package/dist/esm/builders/EmbedBuilder.js +0 -204
  96. package/dist/esm/builders/ModalBuilder.js +0 -157
  97. package/dist/esm/builders/SelectMenuBuilder.js +0 -161
  98. package/dist/esm/builders/SlashCommandBuilder.js +0 -311
  99. package/dist/esm/builders/index.js +0 -10
  100. package/dist/esm/enums.js +0 -208
  101. package/dist/esm/index.js +0 -34
  102. package/dist/esm/managers/BaseManager.js +0 -100
  103. package/dist/esm/managers/ChannelManager.js +0 -200
  104. package/dist/esm/managers/GuildMemberManager.js +0 -153
  105. package/dist/esm/managers/RoleManager.js +0 -203
  106. package/dist/esm/managers/index.js +0 -8
  107. package/dist/esm/rest/REST.js +0 -900
  108. package/dist/esm/rest/index.js +0 -2
  109. package/dist/esm/sharding/ShardingManager.js +0 -366
  110. package/dist/esm/sharding/index.js +0 -5
  111. package/dist/esm/structures/Channel.js +0 -232
  112. package/dist/esm/structures/Collection.js +0 -111
  113. package/dist/esm/structures/Guild.js +0 -90
  114. package/dist/esm/structures/GuildMember.js +0 -306
  115. package/dist/esm/structures/Interaction.js +0 -438
  116. package/dist/esm/structures/Message.js +0 -191
  117. package/dist/esm/structures/User.js +0 -61
  118. package/dist/esm/structures/index.js +0 -9
  119. package/dist/esm/structures.js +0 -3
  120. package/dist/esm/types.js +0 -2
  121. package/dist/esm/utils/BitField.js +0 -134
  122. package/dist/esm/utils/Collection.js +0 -261
  123. package/dist/esm/utils/Collector.js +0 -305
  124. package/dist/esm/utils/DataResolver.js +0 -142
  125. package/dist/esm/utils/Formatters.js +0 -191
  126. package/dist/esm/utils/IntentsBitField.js +0 -93
  127. package/dist/esm/utils/Partials.js +0 -137
  128. package/dist/esm/utils/PermissionsBitField.js +0 -141
  129. package/dist/esm/utils/SnowflakeUtil.js +0 -89
  130. package/dist/esm/utils/Sweepers.js +0 -245
  131. package/dist/esm/utils/index.js +0 -14
@@ -1,245 +0,0 @@
1
- import { APIInteraction, APIInteractionOption, APIEmbed } from '../types';
2
- import { InteractionType } from '../enums';
3
- import { User } from './User';
4
- import { GuildMember } from './GuildMember';
5
- import { EmbedBuilder } from '../builders/EmbedBuilder';
6
- import type { Client } from '../Client';
7
- /**
8
- * Base interaction class
9
- */
10
- export declare class Interaction {
11
- /** Reference to the client */
12
- readonly client: Client;
13
- /** Interaction ID */
14
- readonly id: string;
15
- /** Application ID */
16
- readonly applicationId: string;
17
- /** Interaction type */
18
- readonly type: InteractionType;
19
- /** Guild ID */
20
- readonly guildId?: string;
21
- /** Channel ID */
22
- readonly channelId?: string;
23
- /** Interaction token */
24
- readonly token: string;
25
- /** User who triggered the interaction */
26
- readonly user: User;
27
- /** Guild member (if in a guild) */
28
- readonly member?: GuildMember;
29
- /** Whether the interaction has been replied to */
30
- replied: boolean;
31
- /** Whether the interaction has been deferred */
32
- deferred: boolean;
33
- constructor(client: Client, data: APIInteraction);
34
- /**
35
- * Check if this is a command interaction
36
- */
37
- isCommand(): this is CommandInteraction;
38
- /**
39
- * Check if this is an autocomplete interaction
40
- */
41
- isAutocomplete(): this is AutocompleteInteraction;
42
- /**
43
- * Check if this is a modal submit interaction
44
- */
45
- isModalSubmit(): this is ModalSubmitInteraction;
46
- /**
47
- * Check if this is a button interaction
48
- */
49
- isButton(): this is ButtonInteraction;
50
- /**
51
- * Check if this is a select menu interaction
52
- */
53
- isSelectMenu(): this is SelectMenuInteraction;
54
- /**
55
- * Reply to the interaction
56
- */
57
- reply(options: string | InteractionReplyOptions): Promise<void>;
58
- /**
59
- * Defer the reply (shows "thinking...")
60
- */
61
- deferReply(options?: {
62
- ephemeral?: boolean;
63
- }): Promise<void>;
64
- /**
65
- * Edit the reply
66
- */
67
- editReply(options: string | InteractionReplyOptions): Promise<void>;
68
- /**
69
- * Delete the reply
70
- */
71
- deleteReply(): Promise<void>;
72
- /**
73
- * Send a followup message
74
- */
75
- followUp(options: string | InteractionReplyOptions): Promise<void>;
76
- }
77
- /**
78
- * Command interaction
79
- */
80
- export declare class CommandInteraction extends Interaction {
81
- /** Command name */
82
- readonly commandName: string;
83
- /** Command options */
84
- readonly options: CommandInteractionOptions;
85
- constructor(client: Client, data: APIInteraction);
86
- /**
87
- * Show a modal
88
- */
89
- showModal(modal: ModalData | {
90
- toJSON(): ModalData;
91
- }): Promise<void>;
92
- }
93
- /**
94
- * Command interaction options helper
95
- */
96
- export declare class CommandInteractionOptions {
97
- private options;
98
- constructor(options: APIInteractionOption[]);
99
- /**
100
- * Get a string option
101
- */
102
- getString(name: string, required?: boolean): string | null;
103
- /**
104
- * Get an integer option
105
- */
106
- getInteger(name: string, required?: boolean): number | null;
107
- /**
108
- * Get a number option
109
- */
110
- getNumber(name: string, required?: boolean): number | null;
111
- /**
112
- * Get a boolean option
113
- */
114
- getBoolean(name: string, required?: boolean): boolean | null;
115
- /**
116
- * Get a user option
117
- */
118
- getUser(name: string, required?: boolean): string | null;
119
- /**
120
- * Get a channel option
121
- */
122
- getChannel(name: string, required?: boolean): string | null;
123
- /**
124
- * Get a subcommand name
125
- */
126
- getSubcommand(required?: boolean): string | null;
127
- /**
128
- * Get the focused option (for autocomplete)
129
- */
130
- getFocused(): {
131
- name: string;
132
- value: string;
133
- } | null;
134
- }
135
- /**
136
- * Autocomplete interaction
137
- */
138
- export declare class AutocompleteInteraction extends Interaction {
139
- /** Command name */
140
- readonly commandName: string;
141
- /** Command options */
142
- readonly options: CommandInteractionOptions;
143
- constructor(client: Client, data: APIInteraction);
144
- /**
145
- * Respond with autocomplete choices
146
- */
147
- respond(choices: AutocompleteChoice[]): Promise<void>;
148
- }
149
- /**
150
- * Button interaction
151
- */
152
- export declare class ButtonInteraction extends Interaction {
153
- /** Button custom ID */
154
- readonly customId: string;
155
- /** Component type (always 2 for buttons) */
156
- readonly componentType: number;
157
- /** Message the button is attached to */
158
- readonly message?: any;
159
- constructor(client: Client, data: APIInteraction);
160
- /**
161
- * Update the message the button is attached to
162
- */
163
- update(options: InteractionReplyOptions): Promise<void>;
164
- /**
165
- * Show a modal in response to this button interaction
166
- */
167
- showModal(modal: ModalData | {
168
- toJSON(): ModalData;
169
- }): Promise<void>;
170
- }
171
- /**
172
- * Select menu interaction
173
- */
174
- export declare class SelectMenuInteraction extends Interaction {
175
- /** Select menu custom ID */
176
- readonly customId: string;
177
- /** Component type (always 3 for select menus) */
178
- readonly componentType: number;
179
- /** Selected values */
180
- readonly values: string[];
181
- /** Message the select menu is attached to */
182
- readonly message?: any;
183
- constructor(client: Client, data: APIInteraction);
184
- /**
185
- * Update the message the select menu is attached to
186
- */
187
- update(options: InteractionReplyOptions): Promise<void>;
188
- /**
189
- * Show a modal in response to this select menu interaction
190
- */
191
- showModal(modal: ModalData | {
192
- toJSON(): ModalData;
193
- }): Promise<void>;
194
- }
195
- /**
196
- * Modal submit interaction
197
- */
198
- export declare class ModalSubmitInteraction extends Interaction {
199
- /** Modal custom ID */
200
- readonly customId: string;
201
- /** Modal fields */
202
- readonly fields: ModalFields;
203
- constructor(client: Client, data: APIInteraction);
204
- }
205
- /**
206
- * Modal fields helper
207
- */
208
- export declare class ModalFields {
209
- private fieldMap;
210
- constructor(components: any[]);
211
- /**
212
- * Get a text input value by custom_id
213
- */
214
- getTextInputValue(customId: string): string | null;
215
- /**
216
- * Get a field (alias for getTextInputValue)
217
- */
218
- getField(customId: string): {
219
- value: string;
220
- } | null;
221
- }
222
- export interface InteractionReplyOptions {
223
- content?: string;
224
- embeds?: (APIEmbed | EmbedBuilder)[];
225
- components?: any[];
226
- ephemeral?: boolean;
227
- files?: Array<{
228
- name: string;
229
- data: Buffer;
230
- contentType?: string;
231
- }>;
232
- }
233
- export interface AutocompleteChoice {
234
- name: string;
235
- value: string | number;
236
- }
237
- export interface ModalData {
238
- custom_id: string;
239
- title: string;
240
- components: any[];
241
- }
242
- /**
243
- * Create appropriate interaction class based on type
244
- */
245
- export declare function createInteraction(client: Client, data: APIInteraction): Interaction;