@stelliajs/framework 1.4.0 → 1.4.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.
|
@@ -39,6 +39,9 @@ export class StelliaClient extends Client {
|
|
|
39
39
|
process.on("unhandledRejection", (error) => {
|
|
40
40
|
logger.error(`Unhandled promise rejection: ${error}`);
|
|
41
41
|
});
|
|
42
|
+
process.on("uncaughtException", (error) => {
|
|
43
|
+
logger.error(`Uncaught exception: ${error}`);
|
|
44
|
+
});
|
|
42
45
|
}
|
|
43
46
|
connect = async (token) => {
|
|
44
47
|
if (!this.areManagersLoaded()) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type AutoCompleteManager, type ButtonManager, type CommandManager, type ContextMenuManager, type EventManager, type ModalManager, type SelectMenuManager } from "../managers/index.js";
|
|
2
|
-
import { type Snowflake } from "discord.js";
|
|
3
|
-
import { Locale } from "../utils/translation.js";
|
|
2
|
+
import { type Locale, type Snowflake } from "discord.js";
|
|
4
3
|
export type StructureCustomId = string | RegExp;
|
|
5
4
|
export type InteractionCustomId = string;
|
|
6
5
|
export declare enum InteractionType {
|
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/index.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
+
import { type Locale } from "discord.js";
|
|
1
2
|
interface TranslateArgs {
|
|
2
3
|
[key: string]: any;
|
|
3
4
|
}
|
|
4
|
-
export declare enum Locale {
|
|
5
|
-
EN = "en",
|
|
6
|
-
FR = "fr"
|
|
7
|
-
}
|
|
8
5
|
export declare const translateToLocale: (locale: Locale, key: string, args?: TranslateArgs) => Promise<any>;
|
|
9
6
|
export {};
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import i18next from "i18next";
|
|
2
|
-
export var Locale;
|
|
3
|
-
(function (Locale) {
|
|
4
|
-
Locale["EN"] = "en";
|
|
5
|
-
Locale["FR"] = "fr";
|
|
6
|
-
})(Locale || (Locale = {}));
|
|
7
2
|
export const translateToLocale = async (locale, key, args) => {
|
|
8
3
|
await i18next.changeLanguage(locale);
|
|
9
4
|
return i18next.t(key, { interpolation: { escapeValue: false }, returnObjects: true, ...args });
|