@lotus-tree/types 3.0.0
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.
- package/app.d.ts +1 -0
- package/default-packages/command-handler/commands.d.ts +3 -0
- package/default-packages/command-handler/entities.d.ts +133 -0
- package/default-packages/command-handler/events.d.ts +3 -0
- package/default-packages/command-handler/index.d.ts +3 -0
- package/default-packages/command-handler/util.d.ts +8 -0
- package/index.d.ts +65 -0
- package/mikro-orm.config.d.ts +3 -0
- package/package.json +22 -0
- package/util/checkConfig.d.ts +9 -0
- package/util/package.d.ts +3 -0
package/app.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { EntitySchema } from '@mikro-orm/core';
|
|
2
|
+
export declare const ConfigSchema: import("@mikro-orm/core").EntitySchemaWithMeta<"configs", string, import("@mikro-orm/core").InferEntityFromProperties<{
|
|
3
|
+
readonly guild: Pick<import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, Omit<import("@mikro-orm/core").EmptyOptions, "primary"> & {
|
|
4
|
+
primary: true;
|
|
5
|
+
}, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
6
|
+
readonly item: Pick<import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, Omit<import("@mikro-orm/core").EmptyOptions, "primary"> & {
|
|
7
|
+
primary: true;
|
|
8
|
+
}, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
9
|
+
readonly value: import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, import("@mikro-orm/core").EmptyOptions, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
10
|
+
}, undefined, never, never, false, undefined, undefined>, never, {
|
|
11
|
+
readonly guild: Pick<import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, Omit<import("@mikro-orm/core").EmptyOptions, "primary"> & {
|
|
12
|
+
primary: true;
|
|
13
|
+
}, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
14
|
+
readonly item: Pick<import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, Omit<import("@mikro-orm/core").EmptyOptions, "primary"> & {
|
|
15
|
+
primary: true;
|
|
16
|
+
}, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
17
|
+
readonly value: import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, import("@mikro-orm/core").EmptyOptions, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
18
|
+
}, import("@mikro-orm/core").EntityCtor<import("@mikro-orm/core").InferEntityFromProperties<{
|
|
19
|
+
readonly guild: Pick<import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, Omit<import("@mikro-orm/core").EmptyOptions, "primary"> & {
|
|
20
|
+
primary: true;
|
|
21
|
+
}, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
22
|
+
readonly item: Pick<import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, Omit<import("@mikro-orm/core").EmptyOptions, "primary"> & {
|
|
23
|
+
primary: true;
|
|
24
|
+
}, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
25
|
+
readonly value: import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, import("@mikro-orm/core").EmptyOptions, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
26
|
+
}, undefined, never, never, false, undefined, undefined>>, undefined>;
|
|
27
|
+
export declare const ModuleSchema: import("@mikro-orm/core").EntitySchemaWithMeta<"modules", string, import("@mikro-orm/core").InferEntityFromProperties<{
|
|
28
|
+
readonly guild: Pick<import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, Omit<import("@mikro-orm/core").EmptyOptions, "primary"> & {
|
|
29
|
+
primary: true;
|
|
30
|
+
}, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
31
|
+
readonly module: Pick<import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, Omit<import("@mikro-orm/core").EmptyOptions, "primary"> & {
|
|
32
|
+
primary: true;
|
|
33
|
+
}, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
34
|
+
readonly value: Pick<import("@mikro-orm/core").UniversalPropertyOptionsBuilder<NonNullable<boolean | null | undefined>, Omit<import("@mikro-orm/core").EmptyOptions, "default"> & {
|
|
35
|
+
default: true;
|
|
36
|
+
}, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
37
|
+
}, undefined, never, never, false, undefined, undefined>, never, {
|
|
38
|
+
readonly guild: Pick<import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, Omit<import("@mikro-orm/core").EmptyOptions, "primary"> & {
|
|
39
|
+
primary: true;
|
|
40
|
+
}, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
41
|
+
readonly module: Pick<import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, Omit<import("@mikro-orm/core").EmptyOptions, "primary"> & {
|
|
42
|
+
primary: true;
|
|
43
|
+
}, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
44
|
+
readonly value: Pick<import("@mikro-orm/core").UniversalPropertyOptionsBuilder<NonNullable<boolean | null | undefined>, Omit<import("@mikro-orm/core").EmptyOptions, "default"> & {
|
|
45
|
+
default: true;
|
|
46
|
+
}, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
47
|
+
}, import("@mikro-orm/core").EntityCtor<import("@mikro-orm/core").InferEntityFromProperties<{
|
|
48
|
+
readonly guild: Pick<import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, Omit<import("@mikro-orm/core").EmptyOptions, "primary"> & {
|
|
49
|
+
primary: true;
|
|
50
|
+
}, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
51
|
+
readonly module: Pick<import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, Omit<import("@mikro-orm/core").EmptyOptions, "primary"> & {
|
|
52
|
+
primary: true;
|
|
53
|
+
}, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
54
|
+
readonly value: Pick<import("@mikro-orm/core").UniversalPropertyOptionsBuilder<NonNullable<boolean | null | undefined>, Omit<import("@mikro-orm/core").EmptyOptions, "default"> & {
|
|
55
|
+
default: true;
|
|
56
|
+
}, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
57
|
+
}, undefined, never, never, false, undefined, undefined>>, undefined>;
|
|
58
|
+
export declare const CommandSchema: import("@mikro-orm/core").EntitySchemaWithMeta<"commands", string, import("@mikro-orm/core").InferEntityFromProperties<{
|
|
59
|
+
readonly guild: Pick<import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, Omit<import("@mikro-orm/core").EmptyOptions, "primary"> & {
|
|
60
|
+
primary: true;
|
|
61
|
+
}, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
62
|
+
readonly command: Pick<import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, Omit<import("@mikro-orm/core").EmptyOptions, "primary"> & {
|
|
63
|
+
primary: true;
|
|
64
|
+
}, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
65
|
+
readonly value: Pick<import("@mikro-orm/core").UniversalPropertyOptionsBuilder<NonNullable<boolean | null | undefined>, Omit<import("@mikro-orm/core").EmptyOptions, "default"> & {
|
|
66
|
+
default: true;
|
|
67
|
+
}, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
68
|
+
}, undefined, never, never, false, undefined, undefined>, never, {
|
|
69
|
+
readonly guild: Pick<import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, Omit<import("@mikro-orm/core").EmptyOptions, "primary"> & {
|
|
70
|
+
primary: true;
|
|
71
|
+
}, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
72
|
+
readonly command: Pick<import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, Omit<import("@mikro-orm/core").EmptyOptions, "primary"> & {
|
|
73
|
+
primary: true;
|
|
74
|
+
}, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
75
|
+
readonly value: Pick<import("@mikro-orm/core").UniversalPropertyOptionsBuilder<NonNullable<boolean | null | undefined>, Omit<import("@mikro-orm/core").EmptyOptions, "default"> & {
|
|
76
|
+
default: true;
|
|
77
|
+
}, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
78
|
+
}, import("@mikro-orm/core").EntityCtor<import("@mikro-orm/core").InferEntityFromProperties<{
|
|
79
|
+
readonly guild: Pick<import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, Omit<import("@mikro-orm/core").EmptyOptions, "primary"> & {
|
|
80
|
+
primary: true;
|
|
81
|
+
}, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
82
|
+
readonly command: Pick<import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, Omit<import("@mikro-orm/core").EmptyOptions, "primary"> & {
|
|
83
|
+
primary: true;
|
|
84
|
+
}, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
85
|
+
readonly value: Pick<import("@mikro-orm/core").UniversalPropertyOptionsBuilder<NonNullable<boolean | null | undefined>, Omit<import("@mikro-orm/core").EmptyOptions, "default"> & {
|
|
86
|
+
default: true;
|
|
87
|
+
}, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
88
|
+
}, undefined, never, never, false, undefined, undefined>>, undefined>;
|
|
89
|
+
export declare const PermSchema: import("@mikro-orm/core").EntitySchemaWithMeta<"perms", string, import("@mikro-orm/core").InferEntityFromProperties<{
|
|
90
|
+
readonly id: Pick<import("@mikro-orm/core").UniversalPropertyOptionsBuilder<number, Omit<Omit<import("@mikro-orm/core").EmptyOptions, "primary"> & {
|
|
91
|
+
primary: true;
|
|
92
|
+
}, "autoincrement"> & {
|
|
93
|
+
autoincrement: true;
|
|
94
|
+
}, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
95
|
+
readonly guild: import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, import("@mikro-orm/core").EmptyOptions, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
96
|
+
readonly command: import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, import("@mikro-orm/core").EmptyOptions, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
97
|
+
readonly category: import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, import("@mikro-orm/core").EmptyOptions, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
98
|
+
readonly type: import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, import("@mikro-orm/core").EmptyOptions, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
99
|
+
readonly name: import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, import("@mikro-orm/core").EmptyOptions, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
100
|
+
readonly createdAt: Pick<import("@mikro-orm/core").UniversalPropertyOptionsBuilder<Date, import("@mikro-orm/core").EmptyOptions & {
|
|
101
|
+
onCreate: (...args: any[]) => any;
|
|
102
|
+
}, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
103
|
+
}, undefined, never, never, false, undefined, undefined>, never, {
|
|
104
|
+
readonly id: Pick<import("@mikro-orm/core").UniversalPropertyOptionsBuilder<number, Omit<Omit<import("@mikro-orm/core").EmptyOptions, "primary"> & {
|
|
105
|
+
primary: true;
|
|
106
|
+
}, "autoincrement"> & {
|
|
107
|
+
autoincrement: true;
|
|
108
|
+
}, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
109
|
+
readonly guild: import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, import("@mikro-orm/core").EmptyOptions, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
110
|
+
readonly command: import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, import("@mikro-orm/core").EmptyOptions, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
111
|
+
readonly category: import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, import("@mikro-orm/core").EmptyOptions, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
112
|
+
readonly type: import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, import("@mikro-orm/core").EmptyOptions, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
113
|
+
readonly name: import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, import("@mikro-orm/core").EmptyOptions, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
114
|
+
readonly createdAt: Pick<import("@mikro-orm/core").UniversalPropertyOptionsBuilder<Date, import("@mikro-orm/core").EmptyOptions & {
|
|
115
|
+
onCreate: (...args: any[]) => any;
|
|
116
|
+
}, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
117
|
+
}, import("@mikro-orm/core").EntityCtor<import("@mikro-orm/core").InferEntityFromProperties<{
|
|
118
|
+
readonly id: Pick<import("@mikro-orm/core").UniversalPropertyOptionsBuilder<number, Omit<Omit<import("@mikro-orm/core").EmptyOptions, "primary"> & {
|
|
119
|
+
primary: true;
|
|
120
|
+
}, "autoincrement"> & {
|
|
121
|
+
autoincrement: true;
|
|
122
|
+
}, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
123
|
+
readonly guild: import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, import("@mikro-orm/core").EmptyOptions, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
124
|
+
readonly command: import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, import("@mikro-orm/core").EmptyOptions, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
125
|
+
readonly category: import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, import("@mikro-orm/core").EmptyOptions, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
126
|
+
readonly type: import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, import("@mikro-orm/core").EmptyOptions, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
127
|
+
readonly name: import("@mikro-orm/core").UniversalPropertyOptionsBuilder<string, import("@mikro-orm/core").EmptyOptions, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
128
|
+
readonly createdAt: Pick<import("@mikro-orm/core").UniversalPropertyOptionsBuilder<Date, import("@mikro-orm/core").EmptyOptions & {
|
|
129
|
+
onCreate: (...args: any[]) => any;
|
|
130
|
+
}, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>, keyof import("@mikro-orm/core").PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable" | "lazyRef")>;
|
|
131
|
+
}, undefined, never, never, false, undefined, undefined>>, undefined>;
|
|
132
|
+
declare const entities: EntitySchema[];
|
|
133
|
+
export default entities;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type Snowflake } from 'discord.js';
|
|
2
|
+
import type { ClientGlobals, GuildMessage, ReadyCommand } from '../../index.ts';
|
|
3
|
+
export declare function checkGuildConfig(guild: Snowflake, globals: ClientGlobals): Promise<void>;
|
|
4
|
+
export declare function permCheck(command: ReadyCommand, message: GuildMessage, globals: ClientGlobals, overrides?: {
|
|
5
|
+
user?: boolean;
|
|
6
|
+
role?: boolean;
|
|
7
|
+
channel?: boolean;
|
|
8
|
+
}): Promise<boolean>;
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { Options as MikroORMOptions, EntityManager, EntitySchema } from '@mikro-orm/mariadb';
|
|
2
|
+
import { Client, Events, GatewayIntentBits, Partials } from 'discord.js';
|
|
3
|
+
import type { APIEmbedField, ClientEvents, Message, OmitPartialGroupDMChannel } from 'discord.js';
|
|
4
|
+
import { Array, Object, String, Optional, type Runtype, type Static } from 'runtypes';
|
|
5
|
+
export type Config = Record<string, Record<string, string>>;
|
|
6
|
+
export type LocalConfig = Record<string, Record<string, string>>;
|
|
7
|
+
export type EventFunction<E extends keyof ClientEvents = keyof ClientEvents> = (globals: ClientGlobals, ...args: ClientEvents[E]) => void;
|
|
8
|
+
export type LotusEvents = Partial<{
|
|
9
|
+
[E in keyof ClientEvents]: (globals: ClientGlobals, ...args: ClientEvents[E]) => void;
|
|
10
|
+
}>;
|
|
11
|
+
export interface Package {
|
|
12
|
+
name: string;
|
|
13
|
+
about?: APIEmbedField;
|
|
14
|
+
intents?: GatewayIntentBits[];
|
|
15
|
+
partials?: Partials[];
|
|
16
|
+
events?: LotusEvents;
|
|
17
|
+
commands?: Record<string, Command>;
|
|
18
|
+
config?: Config;
|
|
19
|
+
localConfig?: LocalConfig;
|
|
20
|
+
preload?: (orm: EntityManager) => Promise<void>;
|
|
21
|
+
entities?: EntitySchema[];
|
|
22
|
+
}
|
|
23
|
+
export interface PackageModule {
|
|
24
|
+
name: string;
|
|
25
|
+
commandNames: string[];
|
|
26
|
+
enabled: Record<string, boolean>;
|
|
27
|
+
about?: APIEmbedField;
|
|
28
|
+
}
|
|
29
|
+
export declare const LotusConfigCheck: Object<{
|
|
30
|
+
ormConfig: Runtype<Partial<MikroORMOptions>>;
|
|
31
|
+
discord: Object<{
|
|
32
|
+
token: String;
|
|
33
|
+
}>;
|
|
34
|
+
ownerIds: Array<String>;
|
|
35
|
+
packages: Array<String>;
|
|
36
|
+
permissions: Optional<Array<String>, never>;
|
|
37
|
+
}>;
|
|
38
|
+
export type LotusConfig = Static<typeof LotusConfigCheck>;
|
|
39
|
+
export interface ClientGlobals {
|
|
40
|
+
orm: EntityManager;
|
|
41
|
+
client: Client<boolean>;
|
|
42
|
+
commands: Map<string, ReadyCommand>;
|
|
43
|
+
defaultConfig: Config;
|
|
44
|
+
config: Config;
|
|
45
|
+
localConfig: LocalConfig;
|
|
46
|
+
modules: Map<string, PackageModule>;
|
|
47
|
+
lotusConfig: LotusConfig;
|
|
48
|
+
}
|
|
49
|
+
export interface CommandGlobals extends ClientGlobals {
|
|
50
|
+
param: string[];
|
|
51
|
+
}
|
|
52
|
+
export interface Command {
|
|
53
|
+
usage?: string;
|
|
54
|
+
desc?: string;
|
|
55
|
+
example?: string;
|
|
56
|
+
ownerOnly?: boolean;
|
|
57
|
+
execute: (globals: CommandGlobals, ...args: ClientEvents[Events.MessageCreate]) => Promise<unknown>;
|
|
58
|
+
}
|
|
59
|
+
export interface ReadyCommand extends Command {
|
|
60
|
+
name: string;
|
|
61
|
+
moduleName: string;
|
|
62
|
+
enabled: Record<string, boolean>;
|
|
63
|
+
}
|
|
64
|
+
export type CommandGroup = Record<string, Command>;
|
|
65
|
+
export type GuildMessage = OmitPartialGroupDMChannel<Message<boolean>>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { EntitySchema } from '@mikro-orm/mariadb';
|
|
2
|
+
declare function getORMConfig(): Promise<Partial<import("@mikro-orm/core").Options<import("@mikro-orm/mariadb").MariaDbDriver, import("@mikro-orm/mariadb").SqlEntityManager<import("@mikro-orm/mariadb").MariaDbDriver>, (string | EntitySchema<any, never, import("@mikro-orm/mariadb").EntityCtor<any>> | import("@mikro-orm/mariadb").EntityClass<Partial<any>>)[]>>>;
|
|
3
|
+
export default getORMConfig;
|
package/package.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@lotus-tree/types",
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"homepage": "https://github.com/jorgev259/Lotus-Tree#readme",
|
|
5
|
+
"bugs": {
|
|
6
|
+
"url": "https://github.com/jorgev259/Lotus-Tree/issues"
|
|
7
|
+
},
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/jorgev259/Lotus-Tree.git"
|
|
11
|
+
},
|
|
12
|
+
"type": "module",
|
|
13
|
+
"main": "index.d.ts",
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@mikro-orm/mariadb": "^7.1.4",
|
|
16
|
+
"discord.js": "^14.14.1",
|
|
17
|
+
"runtypes": "^7.0.4"
|
|
18
|
+
},
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">=24.x"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export default function checkConfig(): {
|
|
2
|
+
discord: {
|
|
3
|
+
token: string;
|
|
4
|
+
};
|
|
5
|
+
ownerIds: string[];
|
|
6
|
+
packages: string[];
|
|
7
|
+
ormConfig: Partial<Partial<import("@mikro-orm/core").Options<import("@mikro-orm/mariadb").MariaDbDriver, import("@mikro-orm/sql").EntityManager<import("@mikro-orm/mariadb").MariaDbDriver>, (string | import("@mikro-orm/core").EntitySchema<any, never, import("@mikro-orm/core").EntityCtor<any>> | import("@mikro-orm/core").EntityClass<Partial<any>>)[]>>>;
|
|
8
|
+
permissions?: string[] | undefined;
|
|
9
|
+
};
|