@stelliajs/framework 1.5.1 → 1.5.3
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Client, type ClientOptions, type Interaction } from "discord.js";
|
|
2
2
|
import { type ManagerOptions } from "../managers/index.js";
|
|
3
|
-
import { type ClientEnvironment, type
|
|
3
|
+
import { type ClientEnvironment, type GuildConfiguration, type GuildsConfiguration, type Managers } from "../typescript/index.js";
|
|
4
4
|
export declare class StelliaClient<Ready extends boolean = boolean> extends Client<Ready> {
|
|
5
5
|
private readonly utils;
|
|
6
6
|
readonly managers: Managers;
|
|
@@ -9,7 +9,7 @@ export declare class StelliaClient<Ready extends boolean = boolean> extends Clie
|
|
|
9
9
|
connect: (token: string) => Promise<void>;
|
|
10
10
|
initializeCommands: () => Promise<void>;
|
|
11
11
|
getGuildsConfiguration: <CustomGuildsConfiguration extends GuildsConfiguration>() => Promise<CustomGuildsConfiguration>;
|
|
12
|
-
getGuildConfiguration: (guildId: string) =>
|
|
12
|
+
getGuildConfiguration: <CustomGuildConfiguration extends GuildConfiguration>(guildId: string) => CustomGuildConfiguration | undefined;
|
|
13
13
|
handleInteraction: (interaction: Interaction<"cached">) => Promise<void>;
|
|
14
14
|
private areManagersLoaded;
|
|
15
15
|
private static convertFilePathToProduction;
|
|
@@ -7,7 +7,7 @@ export declare class StelliaUtils {
|
|
|
7
7
|
private guildsConfiguration;
|
|
8
8
|
constructor(client: StelliaClient);
|
|
9
9
|
initializeCommands: () => Promise<void>;
|
|
10
|
-
getGuildConfiguration: (guildId: string) =>
|
|
10
|
+
getGuildConfiguration: <CustomGuildConfiguration extends GuildConfiguration>(guildId: string) => CustomGuildConfiguration | undefined;
|
|
11
11
|
handleInteraction: (interaction: Interaction<"cached">) => Promise<void>;
|
|
12
12
|
private handleAutoCompleteInteraction;
|
|
13
13
|
private handleButtonInteraction;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const formatTimestampToShortDateTime: (timestamp: number) => string;
|
|
2
|
+
export declare const formatTimestampToShortTime: (timestamp: number) => string;
|
|
3
|
+
export declare const formatTimestampToShortDate: (timestamp: number) => string;
|
|
4
|
+
export declare const formatTimestampToLongDateTime: (timestamp: number) => string;
|
|
5
|
+
export declare const formatTimestampToLongTime: (timestamp: number) => string;
|
|
6
|
+
export declare const formatTimestampToLongDate: (timestamp: number) => string;
|
|
7
|
+
export declare const formatTimestampToRelativeTime: (timestamp: number) => string;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { time, TimestampStyles } from "discord.js";
|
|
2
|
+
export const formatTimestampToShortDateTime = (timestamp) => {
|
|
3
|
+
return time(Math.round(timestamp / 1000), TimestampStyles.ShortDateTime);
|
|
4
|
+
};
|
|
5
|
+
export const formatTimestampToShortTime = (timestamp) => {
|
|
6
|
+
return time(Math.round(timestamp / 1000), TimestampStyles.ShortTime);
|
|
7
|
+
};
|
|
8
|
+
export const formatTimestampToShortDate = (timestamp) => {
|
|
9
|
+
return time(Math.round(timestamp / 1000), TimestampStyles.ShortDate);
|
|
10
|
+
};
|
|
11
|
+
export const formatTimestampToLongDateTime = (timestamp) => {
|
|
12
|
+
return time(Math.round(timestamp / 1000), TimestampStyles.LongDateTime);
|
|
13
|
+
};
|
|
14
|
+
export const formatTimestampToLongTime = (timestamp) => {
|
|
15
|
+
return time(Math.round(timestamp / 1000), TimestampStyles.LongTime);
|
|
16
|
+
};
|
|
17
|
+
export const formatTimestampToLongDate = (timestamp) => {
|
|
18
|
+
return time(Math.round(timestamp / 1000), TimestampStyles.LongDate);
|
|
19
|
+
};
|
|
20
|
+
export const formatTimestampToRelativeTime = (timestamp) => {
|
|
21
|
+
return time(Math.round(timestamp / 1000), TimestampStyles.RelativeTime);
|
|
22
|
+
};
|
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stelliajs/framework",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.3",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -24,18 +24,17 @@
|
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"discord.js": "^14.21.0",
|
|
27
|
-
"i18next": "^25.3.
|
|
27
|
+
"i18next": "^25.3.4",
|
|
28
28
|
"log-symbols": "^7.0.1"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@eslint/js": "^9.33.0",
|
|
32
|
-
"discord-api-types": "^0.38.18",
|
|
33
32
|
"eslint-config-prettier": "^10.1.8",
|
|
34
33
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
35
34
|
"eslint-plugin-import": "^2.32.0",
|
|
36
35
|
"prettier": "^3.6.2",
|
|
37
36
|
"tsc-alias": "^1.8.16",
|
|
38
|
-
"typescript-eslint": "^8.39.
|
|
37
|
+
"typescript-eslint": "^8.39.1"
|
|
39
38
|
},
|
|
40
39
|
"type": "module",
|
|
41
40
|
"packageManager": "pnpm@10.14.0"
|