@stelliajs/framework 1.4.4 → 1.4.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.
|
@@ -22,7 +22,7 @@ export class StelliaUtils {
|
|
|
22
22
|
this.guildsConfiguration = guildsConfiguration;
|
|
23
23
|
logger.success("Guilds configuration loaded successfully for interactions");
|
|
24
24
|
})
|
|
25
|
-
.catch((error) => logger.error(`Error while loading guilds configuration: ${error}`));
|
|
25
|
+
.catch((error) => logger.error(`Error while loading guilds configuration: ${error.stack}`));
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
initializeCommands = async () => {
|
|
@@ -36,7 +36,7 @@ export class StelliaUtils {
|
|
|
36
36
|
logger.success("Application commands registered successfully");
|
|
37
37
|
}
|
|
38
38
|
catch (error) {
|
|
39
|
-
logger.error(`Error while registering application commands: ${error}`);
|
|
39
|
+
logger.error(`Error while registering application commands: ${error.stack}`);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
};
|
|
@@ -83,7 +83,7 @@ export class StelliaUtils {
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
catch (error) {
|
|
86
|
-
logger.error(`Error while handling autocomplete interaction: ${error}`);
|
|
86
|
+
logger.error(`Error while handling autocomplete interaction: ${error.stack}`);
|
|
87
87
|
}
|
|
88
88
|
};
|
|
89
89
|
handleButtonInteraction = async (interaction) => {
|
|
@@ -106,7 +106,7 @@ export class StelliaUtils {
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
catch (error) {
|
|
109
|
-
logger.error(`Error while handling button interaction: ${error}`);
|
|
109
|
+
logger.error(`Error while handling button interaction: ${error.stack}`);
|
|
110
110
|
}
|
|
111
111
|
};
|
|
112
112
|
handleCommandInteraction = async (interaction) => {
|
|
@@ -129,7 +129,7 @@ export class StelliaUtils {
|
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
catch (error) {
|
|
132
|
-
logger.error(`Error while handling command interaction: ${error}`);
|
|
132
|
+
logger.error(`Error while handling command interaction: ${error.stack}`);
|
|
133
133
|
}
|
|
134
134
|
};
|
|
135
135
|
handleContextMenuInteraction = async (interaction) => {
|
|
@@ -145,7 +145,7 @@ export class StelliaUtils {
|
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
catch (error) {
|
|
148
|
-
logger.error(`Error while handling context menu interaction: ${error}`);
|
|
148
|
+
logger.error(`Error while handling context menu interaction: ${error.stack}`);
|
|
149
149
|
}
|
|
150
150
|
};
|
|
151
151
|
handleModalInteraction = async (interaction) => {
|
|
@@ -168,7 +168,7 @@ export class StelliaUtils {
|
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
catch (error) {
|
|
171
|
-
logger.error(`Error while handling modal interaction: ${error}`);
|
|
171
|
+
logger.error(`Error while handling modal interaction: ${error.stack}`);
|
|
172
172
|
}
|
|
173
173
|
};
|
|
174
174
|
handleSelectMenuInteraction = async (interaction) => {
|
|
@@ -191,7 +191,7 @@ export class StelliaUtils {
|
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
catch (error) {
|
|
194
|
-
logger.error(`Error while handling select menu interaction: ${error}`);
|
|
194
|
+
logger.error(`Error while handling select menu interaction: ${error.stack}`);
|
|
195
195
|
}
|
|
196
196
|
};
|
|
197
197
|
handleMessageContextMenuInteraction = async (interaction) => {
|
|
@@ -213,7 +213,7 @@ export class StelliaUtils {
|
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
catch (error) {
|
|
216
|
-
logger.error(`Error while handling message context menu interaction: ${error}`);
|
|
216
|
+
logger.error(`Error while handling message context menu interaction: ${error.stack}`);
|
|
217
217
|
}
|
|
218
218
|
};
|
|
219
219
|
handleUserContextMenuInteraction = async (interaction) => {
|
|
@@ -235,7 +235,7 @@ export class StelliaUtils {
|
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
237
|
catch (error) {
|
|
238
|
-
logger.error(`Error while handling user context menu interaction: ${error}`);
|
|
238
|
+
logger.error(`Error while handling user context menu interaction: ${error.stack}`);
|
|
239
239
|
}
|
|
240
240
|
};
|
|
241
241
|
getInteractionType(interaction) {
|
|
@@ -13,7 +13,7 @@ export class EventManager extends BaseManager {
|
|
|
13
13
|
this.guildsConfiguration = guildsConfiguration;
|
|
14
14
|
logger.success("Guilds configuration loaded successfully for event");
|
|
15
15
|
})
|
|
16
|
-
.catch((error) => logger.error(`Error while loading guilds configuration: ${error}`));
|
|
16
|
+
.catch((error) => logger.error(`Error while loading guilds configuration: ${error.stack}`));
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
async loadData() {
|
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { type BaseMessageOptions, type RepliableInteraction } from "discord.js";
|
|
2
|
-
export declare const ephemeralFollowUpResponse: (interaction: RepliableInteraction, data: string | BaseMessageOptions, automaticDeletion?: boolean) => Promise<void>;
|
|
3
|
-
export declare const ephemeralReplyResponse: (interaction: RepliableInteraction, data: BaseMessageOptions, automaticDeletion?: boolean) => Promise<void>;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { MessageFlags } from "discord.js";
|
|
2
|
-
export const ephemeralFollowUpResponse = async (interaction, data, automaticDeletion = false) => {
|
|
3
|
-
if (!interaction.deferred) {
|
|
4
|
-
await interaction.deferReply({ flags: MessageFlags.Ephemeral });
|
|
5
|
-
}
|
|
6
|
-
if (typeof data === "string") {
|
|
7
|
-
await interaction.followUp({ content: data, flags: MessageFlags.Ephemeral });
|
|
8
|
-
}
|
|
9
|
-
else {
|
|
10
|
-
await interaction.followUp({ ...data, flags: MessageFlags.Ephemeral });
|
|
11
|
-
}
|
|
12
|
-
if (automaticDeletion) {
|
|
13
|
-
setTimeout(() => {
|
|
14
|
-
try {
|
|
15
|
-
interaction.deleteReply();
|
|
16
|
-
}
|
|
17
|
-
catch { }
|
|
18
|
-
}, 60 * 1000);
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
export const ephemeralReplyResponse = async (interaction, data, automaticDeletion = false) => {
|
|
22
|
-
if (!interaction.deferred) {
|
|
23
|
-
await interaction.deferReply({ flags: MessageFlags.Ephemeral });
|
|
24
|
-
}
|
|
25
|
-
if (typeof data === "string") {
|
|
26
|
-
await interaction.reply({ content: data, flags: MessageFlags.Ephemeral });
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
await interaction.reply({ ...data, flags: MessageFlags.Ephemeral });
|
|
30
|
-
}
|
|
31
|
-
if (automaticDeletion) {
|
|
32
|
-
setTimeout(() => {
|
|
33
|
-
try {
|
|
34
|
-
interaction.deleteReply();
|
|
35
|
-
}
|
|
36
|
-
catch { }
|
|
37
|
-
}, 60 * 1000);
|
|
38
|
-
}
|
|
39
|
-
};
|