xernerx 0.1.120-beta.1

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/dist/main.d.ts ADDED
@@ -0,0 +1,167 @@
1
+ import * as Discord from 'discord.js';
2
+
3
+ /** @format */
4
+ interface XernerxStats {
5
+ guilds: null | number;
6
+ users: null | number;
7
+ shardId: null | number;
8
+ shardCount: null | number;
9
+ shards: null | number;
10
+ voteCount: null | number;
11
+ votes: null | number;
12
+ }
13
+ interface XernerxSlashCommandHandlerOptions {
14
+ directory: string;
15
+ global: boolean;
16
+ }
17
+ interface XernerxMessageCommandHandlerOptions {
18
+ directory: string;
19
+ global: boolean;
20
+ }
21
+ interface XernerxContextCommandHandlerOptions {
22
+ directory: string;
23
+ global: boolean;
24
+ }
25
+
26
+ /** @format */
27
+ declare class XernerxContextCommand {
28
+ readonly _id: string;
29
+ readonly name: string;
30
+ readonly description: string;
31
+ readonly global: boolean;
32
+ readonly filetype: 'XernerxContextCommand';
33
+ readonly collection: 'context.commands';
34
+ constructor(options: any);
35
+ }
36
+
37
+ /** @format */
38
+ declare class XernerxEvent {
39
+ readonly _id: string;
40
+ readonly name: string;
41
+ readonly description: string;
42
+ readonly filetype: 'XernerxEvent';
43
+ readonly collection: 'events';
44
+ constructor(options: any);
45
+ }
46
+
47
+ /** @format */
48
+ declare class XernerxInhibitor {
49
+ readonly _id: string;
50
+ readonly name: string;
51
+ readonly description: string;
52
+ readonly filetype: 'XernerxInhibitor';
53
+ readonly collection: 'inhibitors';
54
+ constructor(options: any);
55
+ }
56
+
57
+ /** @format */
58
+ declare class XernerxMessageCommand {
59
+ readonly _id: string;
60
+ readonly name: string;
61
+ readonly description: string;
62
+ readonly global: boolean;
63
+ readonly filetype: 'XernerxMessageCommand';
64
+ readonly collection: 'message.commands';
65
+ constructor(options: any);
66
+ }
67
+
68
+ /** @format */
69
+
70
+ declare class XernerxSlashCommand extends Discord.SlashCommandBuilder {
71
+ readonly _id: string;
72
+ readonly global: boolean;
73
+ readonly filetype: 'XernerxSlashCommand';
74
+ readonly collection: 'slash.commands';
75
+ constructor(options: any);
76
+ }
77
+
78
+ /** @format */
79
+
80
+ type XernerxFileType = 'XernerxSlashCommand' | 'XernerxMessageCommand' | 'XernerxContextCommand' | 'XernerxEvent' | 'XernerxInhibitor';
81
+ type XernerxFile<T = XernerxFileType> = T extends 'XernerxSlashCommand' ? XernerxSlashCommand : T extends 'XernerxMessageCommand' ? XernerxMessageCommand : T extends 'XernerxContextCommand' ? XernerxContextCommand : T extends 'XernerxEvent' ? XernerxEvent : T extends 'XernerxInhibitor' ? XernerxInhibitor : XernerxSlashCommand | XernerxMessageCommand | XernerxSlashCommand | XernerxEvent | XernerxInhibitor;
82
+
83
+ /** @format */
84
+
85
+ declare class Handler {
86
+ readonly client: XernerxClient;
87
+ constructor(client: XernerxClient);
88
+ protected readdir(directory: string): Promise<string[]>;
89
+ protected load(filepath: string): Promise<XernerxFile | null>;
90
+ }
91
+
92
+ /** @format */
93
+
94
+ declare class CommandHandler extends Handler {
95
+ constructor(client: XernerxClient);
96
+ protected loadSlashCommands(options: XernerxSlashCommandHandlerOptions): Promise<void>;
97
+ protected loadMessageCommands(options: XernerxMessageCommandHandlerOptions): Promise<void>;
98
+ protected loadContextCommands(options: XernerxContextCommandHandlerOptions): Promise<void>;
99
+ }
100
+
101
+ /** @format */
102
+
103
+ declare class Util {
104
+ readonly client: XernerxClient;
105
+ constructor(client: XernerxClient);
106
+ }
107
+
108
+ /** @format */
109
+
110
+ declare class ClientUtil extends Util {
111
+ constructor(client: XernerxClient);
112
+ uptime(timestamp?: number | null): string;
113
+ }
114
+
115
+ /** @format */
116
+
117
+ declare class XernerxClient<T = {}> extends Discord.Client {
118
+ readonly settings: {
119
+ token: string;
120
+ global: boolean;
121
+ owners: string[];
122
+ guilds: string[];
123
+ debug: boolean;
124
+ };
125
+ readonly stats: XernerxStats;
126
+ readonly modules: {
127
+ commandHandler: CommandHandler;
128
+ options: {
129
+ message?: {
130
+ global?: boolean;
131
+ };
132
+ slash?: {
133
+ global?: boolean;
134
+ };
135
+ context?: {
136
+ global?: boolean;
137
+ };
138
+ };
139
+ };
140
+ readonly util: ClientUtil;
141
+ readonly commands: {
142
+ message: Discord.Collection<string, XernerxMessageCommand>;
143
+ slash: Discord.Collection<string, XernerxSlashCommand>;
144
+ context: Discord.Collection<string, XernerxContextCommand>;
145
+ stats: {
146
+ slash: {
147
+ local: number;
148
+ global: number;
149
+ };
150
+ message: {
151
+ local: number;
152
+ global: number;
153
+ };
154
+ context: {
155
+ local: number;
156
+ global: number;
157
+ };
158
+ };
159
+ };
160
+ readonly events: Discord.Collection<string, XernerxEvent>;
161
+ readonly inhibitors: Discord.Collection<string, XernerxInhibitor>;
162
+ constructor(DiscordOptions: any, XernerxOptions: any, config: T);
163
+ private connect;
164
+ private deploy;
165
+ }
166
+
167
+ export { XernerxClient, XernerxSlashCommand };