@open-discord-bots/framework 0.0.1 → 0.0.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.
Files changed (103) hide show
  1. package/LICENSE.md +713 -0
  2. package/README.md +104 -0
  3. package/dist/api/api.d.ts +26 -0
  4. package/dist/api/api.js +44 -0
  5. package/dist/api/main.d.ts +133 -0
  6. package/dist/api/main.js +87 -0
  7. package/dist/api/modules/action.d.ts +34 -0
  8. package/dist/api/modules/action.js +58 -0
  9. package/dist/api/modules/base.d.ts +329 -0
  10. package/dist/api/modules/base.js +804 -0
  11. package/dist/api/modules/builder.d.ts +647 -0
  12. package/dist/api/modules/builder.js +1441 -0
  13. package/dist/api/modules/checker.d.ts +648 -0
  14. package/dist/api/modules/checker.js +1324 -0
  15. package/dist/api/modules/client.d.ts +768 -0
  16. package/dist/api/modules/client.js +1859 -0
  17. package/dist/api/modules/code.d.ts +33 -0
  18. package/dist/api/modules/code.js +57 -0
  19. package/dist/api/modules/config.d.ts +70 -0
  20. package/dist/api/modules/config.js +206 -0
  21. package/dist/api/modules/console.d.ts +305 -0
  22. package/dist/api/modules/console.js +598 -0
  23. package/dist/api/modules/cooldown.d.ts +138 -0
  24. package/dist/api/modules/cooldown.js +359 -0
  25. package/dist/api/modules/database.d.ts +135 -0
  26. package/dist/api/modules/database.js +271 -0
  27. package/dist/api/modules/event.d.ts +43 -0
  28. package/dist/api/modules/event.js +100 -0
  29. package/dist/api/modules/flag.d.ts +40 -0
  30. package/dist/api/modules/flag.js +72 -0
  31. package/dist/api/modules/fuse.d.ts +218 -0
  32. package/dist/api/modules/fuse.js +123 -0
  33. package/dist/api/modules/helpmenu.d.ts +106 -0
  34. package/dist/api/modules/helpmenu.js +167 -0
  35. package/dist/api/modules/language.d.ts +85 -0
  36. package/dist/api/modules/language.js +195 -0
  37. package/dist/api/modules/permission.d.ts +121 -0
  38. package/dist/api/modules/permission.js +314 -0
  39. package/dist/api/modules/plugin.d.ts +128 -0
  40. package/dist/api/modules/plugin.js +168 -0
  41. package/dist/api/modules/post.d.ts +44 -0
  42. package/dist/api/modules/post.js +92 -0
  43. package/dist/api/modules/progressbar.d.ts +108 -0
  44. package/dist/api/modules/progressbar.js +233 -0
  45. package/dist/api/modules/responder.d.ts +506 -0
  46. package/dist/api/modules/responder.js +1468 -0
  47. package/dist/api/modules/session.d.ts +58 -0
  48. package/dist/api/modules/session.js +171 -0
  49. package/dist/api/modules/startscreen.d.ts +165 -0
  50. package/dist/api/modules/startscreen.js +293 -0
  51. package/dist/api/modules/stat.d.ts +142 -0
  52. package/dist/api/modules/stat.js +293 -0
  53. package/dist/api/modules/verifybar.d.ts +54 -0
  54. package/dist/api/modules/verifybar.js +60 -0
  55. package/dist/api/modules/worker.d.ts +41 -0
  56. package/dist/api/modules/worker.js +93 -0
  57. package/dist/api/utils.d.ts +61 -0
  58. package/dist/api/utils.js +254 -0
  59. package/dist/index.d.ts +4 -1
  60. package/dist/index.js +40 -0
  61. package/dist/startup/dump.d.ts +14 -0
  62. package/dist/startup/dump.js +79 -0
  63. package/dist/startup/errorHandling.d.ts +2 -0
  64. package/dist/startup/errorHandling.js +43 -0
  65. package/dist/startup/pluginLauncher.d.ts +2 -0
  66. package/dist/startup/pluginLauncher.js +202 -0
  67. package/package.json +9 -3
  68. package/src/api/api.ts +29 -0
  69. package/src/api/main.ts +189 -0
  70. package/src/api/modules/action.ts +58 -0
  71. package/src/api/modules/base.ts +811 -0
  72. package/src/api/modules/builder.ts +1554 -0
  73. package/src/api/modules/checker.ts +1549 -0
  74. package/src/api/modules/client.ts +2247 -0
  75. package/src/api/modules/code.ts +58 -0
  76. package/src/api/modules/config.ts +159 -0
  77. package/src/api/modules/console.ts +665 -0
  78. package/src/api/modules/cooldown.ts +348 -0
  79. package/src/api/modules/database.ts +278 -0
  80. package/src/api/modules/event.ts +99 -0
  81. package/src/api/modules/flag.ts +73 -0
  82. package/src/api/modules/fuse.ts +348 -0
  83. package/src/api/modules/helpmenu.ts +216 -0
  84. package/src/api/modules/language.ts +201 -0
  85. package/src/api/modules/permission.ts +340 -0
  86. package/src/api/modules/plugin.ts +242 -0
  87. package/src/api/modules/post.ts +90 -0
  88. package/src/api/modules/progressbar.ts +232 -0
  89. package/src/api/modules/responder.ts +1420 -0
  90. package/src/api/modules/session.ts +155 -0
  91. package/src/api/modules/startscreen.ts +320 -0
  92. package/src/api/modules/stat.ts +313 -0
  93. package/src/api/modules/verifybar.ts +61 -0
  94. package/src/api/modules/worker.ts +93 -0
  95. package/src/api/utils.ts +206 -0
  96. package/src/cli/cli.ts +151 -0
  97. package/src/cli/editConfig.ts +943 -0
  98. package/src/index.ts +6 -1
  99. package/src/startup/compilation.ts +186 -0
  100. package/src/startup/dump.ts +45 -0
  101. package/src/startup/errorHandling.ts +38 -0
  102. package/src/startup/pluginLauncher.ts +261 -0
  103. package/LICENSE +0 -21
@@ -0,0 +1,99 @@
1
+ ///////////////////////////////////////
2
+ //EVENT MODULE
3
+ ///////////////////////////////////////
4
+ import { ODManagerData, ODManager, ODValidId } from "./base"
5
+ import { ODConsoleWarningMessage, ODDebugger } from "./console"
6
+
7
+ /**## ODEvent `class`
8
+ * This is an Open Discord event.
9
+ *
10
+ * This class is made to work with the `ODEventManager` to handle events.
11
+ * The function of this specific class is to manage all listeners for a specifc event!
12
+ */
13
+ export class ODEvent extends ODManagerData {
14
+ /**Alias to Open Discord debugger. */
15
+ #debug?: ODDebugger
16
+ /**The list of permanent listeners. */
17
+ listeners: Function[] = []
18
+ /**The list of one-time listeners. List is cleared every time the event is emitted. */
19
+ oncelisteners: Function[] = []
20
+ /**The max listener limit before a possible memory leak will be announced */
21
+ listenerLimit: number = 25
22
+
23
+ /**Use the Open Discord debugger in this manager for logs*/
24
+ useDebug(debug:ODDebugger|null){
25
+ this.#debug = debug ?? undefined
26
+ }
27
+ /**Get a collection of listeners combined from both types. Also clears the one-time listeners array! */
28
+ #getCurrentListeners(){
29
+ const final: Function[] = []
30
+ this.oncelisteners.forEach((l) => final.push(l))
31
+ this.listeners.forEach((l) => final.push(l))
32
+
33
+ this.oncelisteners = []
34
+ return final
35
+ }
36
+ /**Edit the listener limit */
37
+ setListenerLimit(limit:number){
38
+ this.listenerLimit = limit
39
+ }
40
+ /**Add a permanent callback to this event. This will stay as long as the bot is running! */
41
+ listen(callback:Function){
42
+ this.listeners.push(callback)
43
+
44
+ if (this.listeners.length > this.listenerLimit){
45
+ if (this.#debug) this.#debug.console.log(new ODConsoleWarningMessage("Possible event memory leak detected!",[
46
+ {key:"event",value:this.id.value},
47
+ {key:"listeners",value:this.listeners.length.toString()}
48
+ ]))
49
+ }
50
+ }
51
+ /**Add a one-time-only callback to this event. This will only trigger the callback once! */
52
+ listenOnce(callback:Function){
53
+ this.oncelisteners.push(callback)
54
+ }
55
+ /**Wait until this event is fired! Be carefull with it, because it could block the entire bot when wrongly used! */
56
+ async wait(): Promise<any[]> {
57
+ return new Promise((resolve,reject) => {
58
+ this.oncelisteners.push((...args:any) => {resolve(args)})
59
+ })
60
+ }
61
+ /**Emit this event to all listeners. You are required to provide all parameters of the event! */
62
+ async emit(params:any[]): Promise<void> {
63
+ for (const listener of this.#getCurrentListeners()){
64
+ try{
65
+ await listener(...params)
66
+ }catch(err){
67
+ process.emit("uncaughtException",err)
68
+ }
69
+ }
70
+ }
71
+ }
72
+
73
+ /**## ODEventManager `class`
74
+ * This is an Open Discord event manager.
75
+ *
76
+ * This class is made to manage all events in the bot. You can compare it with the built-in node.js `EventEmitter`
77
+ *
78
+ * It's not recommended to create this class yourself. Plugin events should be registered in their `plugin.json` file instead.
79
+ * All events are available in the `opendiscord.events` global!
80
+ */
81
+ export class ODEventManager extends ODManager<ODEvent> {
82
+ /**Reference to the Open Discord debugger */
83
+ #debug: ODDebugger
84
+
85
+ constructor(debug:ODDebugger){
86
+ super(debug,"event")
87
+ this.#debug = debug
88
+ }
89
+
90
+ add(data:ODEvent, overwrite?:boolean): boolean {
91
+ data.useDebug(this.#debug)
92
+ return super.add(data,overwrite)
93
+ }
94
+ remove(id:ODValidId): ODEvent|null {
95
+ const data = super.remove(id)
96
+ if (data) data.useDebug(null)
97
+ return data
98
+ }
99
+ }
@@ -0,0 +1,73 @@
1
+ ///////////////////////////////////////
2
+ //FLAG MODULE
3
+ ///////////////////////////////////////
4
+ import { ODId, ODValidId, ODManager, ODManagerData } from "./base"
5
+ import { ODDebugger } from "./console"
6
+
7
+ /**## ODFlag `class`
8
+ * This is an Open Discord flag.
9
+ *
10
+ * A flag is a boolean that can be specified by a parameter in the console.
11
+ * It's useful for small settings that are only required once in a while.
12
+ *
13
+ * Flags can also be enabled manually by plugins!
14
+ */
15
+ export class ODFlag extends ODManagerData {
16
+ /**The method that has been used to set the value of this flag. (`null` when not set) */
17
+ method: "param"|"manual"|null = null
18
+ /**The name of this flag. Visible to the user. */
19
+ name: string
20
+ /**The description of this flag. Visible to the user. */
21
+ description: string
22
+ /**The name of the parameter in the console. (e.g. `--test`) */
23
+ param: string
24
+ /**A list of aliases for the parameter in the console. */
25
+ aliases: string[]
26
+ /**The value of this flag. */
27
+ value: boolean = false
28
+
29
+ constructor(id:ODValidId, name:string, description:string, param:string, aliases?:string[], initialValue?:boolean){
30
+ super(id)
31
+ this.name = name
32
+ this.description = description
33
+ this.param = param
34
+ this.aliases = aliases ?? []
35
+ this.value = initialValue ?? false
36
+ }
37
+
38
+ /**Set the value of this flag. */
39
+ setValue(value:boolean,method?:"param"|"manual"){
40
+ this.value = value
41
+ this.method = method ?? "manual"
42
+ }
43
+ /**Detect if the process contains the param or aliases & set the value. Use `force` to overwrite a manually set value. */
44
+ detectProcessParams(force?:boolean){
45
+ if (force){
46
+ const params = [this.param,...this.aliases]
47
+ this.setValue(params.some((p) => process.argv.includes(p)),"param")
48
+
49
+ }else if (this.method != "manual"){
50
+ const params = [this.param,...this.aliases]
51
+ this.setValue(params.some((p) => process.argv.includes(p)),"param")
52
+ }
53
+ }
54
+ }
55
+
56
+ /**## ODFlagManager `class`
57
+ * This is an Open Discord flag manager.
58
+ *
59
+ * This class is responsible for managing & initiating all flags of the bot.
60
+ * It also contains a shortcut for initiating all flags.
61
+ */
62
+ export class ODFlagManager extends ODManager<ODFlag> {
63
+ constructor(debug:ODDebugger){
64
+ super(debug,"flag")
65
+ }
66
+
67
+ /**Set all flags to their `process.argv` value. */
68
+ async init(){
69
+ await this.loopAll((flag) => {
70
+ flag.detectProcessParams(false)
71
+ })
72
+ }
73
+ }
@@ -0,0 +1,348 @@
1
+ ///////////////////////////////////////
2
+ //FUSE MODULE
3
+ ///////////////////////////////////////
4
+
5
+ /**## ODFuseBooleans `type`
6
+ * This type is a list of boolean fuses available in the `ODFuseManager` class.
7
+ * It's used to generate typescript declarations for this class.
8
+ */
9
+ export type ODFuseBooleans<FuseList extends object> = {
10
+ [Key in keyof FuseList]: FuseList[Key] extends boolean ? Key : never
11
+ }[keyof FuseList]
12
+
13
+ /**## ODFuseStrings `type`
14
+ * This type is a list of string fuses available in the `ODFuseManager` class.
15
+ * It's used to generate typescript declarations for this class.
16
+ */
17
+ export type ODFuseStrings<FuseList extends object> = {
18
+ [Key in keyof FuseList]: FuseList[Key] extends string ? Key : never
19
+ }[keyof FuseList]
20
+
21
+ /**## ODFuseNumbers `type`
22
+ * This type is a list of number fuses available in the `ODFuseManager` class.
23
+ * It's used to generate typescript declarations for this class.
24
+ */
25
+ export type ODFuseNumbers<FuseList extends object> = {
26
+ [Key in keyof FuseList]: FuseList[Key] extends number ? Key : never
27
+ }[keyof FuseList]
28
+
29
+ /**## ODFuseStringArray `type`
30
+ * This type is a list of string[] fuses available in the `ODFuseManager` class.
31
+ * It's used to generate typescript declarations for this class.
32
+ */
33
+ export type ODFuseStringArray<FuseList extends object> = {
34
+ [Key in keyof FuseList]: FuseList[Key] extends string[] ? Key : never
35
+ }[keyof FuseList]
36
+
37
+ /**## ODFuseManager `class`
38
+ * This is an Open Discord fuse manager.
39
+ *
40
+ * It manages all settings in Open Discord that are not meant to be in the config.
41
+ * Here you can disable certain default features of the bot to replace them with your own implementation!
42
+ *
43
+ * You can think of them like real fuses, they disable an entire branch of the bot!
44
+ */
45
+ export class ODFuseManager<FuseList extends object> {
46
+ /**A list of all the defaults */
47
+ private fuses: FuseList
48
+
49
+ constructor(fuses:FuseList){
50
+ this.fuses = fuses
51
+ }
52
+
53
+ /**Set a fuse to a specific value. Remember! All plugins can edit these values, so your value could be overwritten! */
54
+ setFuse<DefaultName extends keyof FuseList>(key:DefaultName, value:FuseList[DefaultName]): void {
55
+ this.fuses[key] = value
56
+ }
57
+
58
+ /**Get a fuse. Remember! All plugins can edit these values, so this value could be overwritten! */
59
+ getFuse<DefaultName extends keyof FuseList>(key:DefaultName): FuseList[DefaultName] {
60
+ return this.fuses[key]
61
+ }
62
+ }
63
+
64
+ /**## ODSharedFuseList `interface`
65
+ * This type is a list of all fuses available in the `ODSharedFuseManager` class.
66
+ * It's used to generate typescript declarations for this class.
67
+ */
68
+ export interface ODSharedFuseList {
69
+ /**Enable the default error handling system. */
70
+ errorHandling:boolean,
71
+ /**Crash when there is an unknown bot error. */
72
+ crashOnError:boolean,
73
+ /**Enable the system responsible for the `--debug` flag. */
74
+ debugLoading:boolean,
75
+ /**Enable the system responsible for the `--silent` flag. */
76
+ silentLoading:boolean,
77
+ /**When enabled, you're able to use the "!OPENTICKET:dump" command to send the debug file. This is only possible when you're the owner of the bot. */
78
+ allowDumpCommand:boolean,
79
+ /**Enable loading all Open Discord plugins, sadly enough is only useful for the system :) */
80
+ pluginLoading:boolean,
81
+ /**Don't crash the bot when a plugin crashes! */
82
+ softPluginLoading:boolean,
83
+
84
+ /**Load the default Open Discord plugin classes. */
85
+ pluginClassLoading:boolean,
86
+
87
+ /**Load the default Open Discord flags. */
88
+ flagLoading:boolean,
89
+ /**Enable the default initializer for Open Discord flags. */
90
+ flagInitiating:boolean,
91
+ /**Load the default Open Discord progress bar renderers. */
92
+ progressBarRendererLoading:boolean,
93
+ /**Load the default Open Discord progress bars. */
94
+ progressBarLoading:boolean,
95
+ /**Load the default Open Discord configs. */
96
+ configLoading:boolean,
97
+ /**Enable the default initializer for Open Discord config. */
98
+ configInitiating:boolean,
99
+ /**Load the default Open Discord databases. */
100
+ databaseLoading:boolean,
101
+ /**Enable the default initializer for Open Discord database. */
102
+ databaseInitiating:boolean,
103
+ /**Load the default Open Discord sessions. */
104
+ sessionLoading:boolean,
105
+
106
+ /**Load the default Open Discord languages. */
107
+ languageLoading:boolean,
108
+ /**Enable the default initializer for Open Discord languages. */
109
+ languageInitiating:boolean,
110
+ /**Enable selecting the current language from `config/general.json`. */
111
+ languageSelection:boolean,
112
+ /**Set the backup language when the primary language is missing a property. */
113
+ backupLanguage:string,
114
+ /****[NOT FOR PLUGIN TRANSLATIONS]** The full list of available languages (used in the default config checker). */
115
+ languageList:string[],
116
+
117
+ /**Load the default Open Discord config checker. */
118
+ checkerLoading:boolean,
119
+ /**Load the default Open Discord config checker functions. */
120
+ checkerFunctionLoading:boolean,
121
+ /**Enable the default execution of the config checkers. */
122
+ checkerExecution:boolean,
123
+ /**Load the default Open Discord config checker translations. */
124
+ checkerTranslationLoading:boolean,
125
+ /**Enable the default rendering of the config checkers. */
126
+ checkerRendering:boolean,
127
+ /**Enable the default quit action when there is an error in the config checker. */
128
+ checkerQuit:boolean,
129
+ /**Render the checker even when there are no errors & warnings. */
130
+ checkerRenderEmpty:boolean,
131
+
132
+ /**Load the default Open Discord client configuration. */
133
+ clientLoading:boolean,
134
+ /**Load the default Open Discord client initialization. */
135
+ clientInitiating:boolean,
136
+ /**Load the default Open Discord client ready actions (status, commands, permissions, ...). */
137
+ clientReady:boolean,
138
+ /**Create a warning when the bot is present in multiple guilds. */
139
+ clientMultiGuildWarning:boolean,
140
+ /**Load the default Open Discord client activity (from `config/general.json`). */
141
+ clientActivityLoading:boolean,
142
+ /**Load the default Open Discord client activity initialization (& status refresh). */
143
+ clientActivityInitiating:boolean,
144
+
145
+ /**Load the default Open Discord priority levels. */
146
+ priorityLoading:boolean,
147
+
148
+ /**Load the default Open Discord slash commands. */
149
+ slashCommandLoading:boolean,
150
+ /**Load the default Open Discord slash command registerer (register slash cmds in discord). */
151
+ slashCommandRegistering:boolean,
152
+ /**When enabled, the bot is forced to re-register all slash commands in the server. This can be used in case of a auto-update malfunction. */
153
+ forceSlashCommandRegistration:boolean,
154
+ /**When enabled, the bot is allowed to unregister all slash commands which aren't used in Open Discord. Disable this if you don't want to use the Open Discord `ODSlashCommand` classes. */
155
+ allowSlashCommandRemoval:boolean,
156
+ /**Load the default Open Discord context menus. */
157
+ contextMenuLoading:boolean,
158
+ /**Load the default Open Discord context menu registerer (register menus in discord). */
159
+ contextMenuRegistering:boolean,
160
+ /**When enabled, the bot is forced to re-register all context menus in the server. This can be used in case of a auto-update malfunction. */
161
+ forceContextMenuRegistration:boolean,
162
+ /**When enabled, the bot is allowed to unregister all context menus which aren't used in Open Discord. Disable this if you don't want to use the Open Discord `ODContextMenu` classes. */
163
+ allowContextMenuRemoval:boolean,
164
+ /**Load the default Open Discord text commands. */
165
+ textCommandLoading:boolean,
166
+
167
+ /**Load the default Open Discord button builders. */
168
+ buttonBuildersLoading:boolean,
169
+ /**Load the default Open Discord dropdown builders. */
170
+ dropdownBuildersLoading:boolean,
171
+ /**Load the default Open Discord file builders. */
172
+ fileBuildersLoading:boolean,
173
+ /**Load the default Open Discord embed builders. */
174
+ embedBuildersLoading:boolean,
175
+ /**Load the default Open Discord message builders. */
176
+ messageBuildersLoading:boolean,
177
+ /**Load the default Open Discord modal builders. */
178
+ modalBuildersLoading:boolean,
179
+
180
+ /**Load the default Open Discord command responders. */
181
+ commandRespondersLoading:boolean,
182
+ /**Load the default Open Discord button responders. */
183
+ buttonRespondersLoading:boolean,
184
+ /**Load the default Open Discord dropdown responders. */
185
+ dropdownRespondersLoading:boolean,
186
+ /**Load the default Open Discord modal responders. */
187
+ modalRespondersLoading:boolean,
188
+ /**Load the default Open Discord context menu responders. */
189
+ contextMenuRespondersLoading:boolean,
190
+ /**Load the default Open Discord autocomplete responders. */
191
+ autocompleteRespondersLoading:boolean,
192
+ /**Set the time (in ms) before Open Discord sends an error message when no reply is sent in a responder. */
193
+ responderTimeoutMs:number,
194
+
195
+ /**Load the default Open Discord actions. */
196
+ actionsLoading:boolean,
197
+
198
+ /**Load the default Open Discord verify bars. */
199
+ verifyBarsLoading:boolean,
200
+ /**Load the default Open Discord permissions. */
201
+ permissionsLoading:boolean,
202
+ /**Load the default Open Discord posts. */
203
+ postsLoading:boolean,
204
+ /**Initiate the default Open Discord posts. */
205
+ postsInitiating:boolean,
206
+ /**Load the default Open Discord cooldowns. */
207
+ cooldownsLoading:boolean,
208
+ /**Initiate the default Open Discord cooldowns. */
209
+ cooldownsInitiating:boolean,
210
+ /**Load the default Open Discord help menu categories. */
211
+ helpMenuCategoryLoading:boolean,
212
+ /**Load the default Open Discord help menu components. */
213
+ helpMenuComponentLoading:boolean,
214
+
215
+ /**Load the default Open Discord stat scopes. */
216
+ statScopesLoading:boolean,
217
+ /**Load the default Open Discord stats. */
218
+ statLoading:boolean,
219
+ /**Initiate the default Open Discord stats. */
220
+ statInitiating:boolean,
221
+
222
+ /**Load the default Open Discord code/functions. */
223
+ codeLoading:boolean,
224
+ /**Execute the default Open Discord code/functions. */
225
+ codeExecution:boolean,
226
+
227
+ /**Load the default Open Discord livestatus. */
228
+ liveStatusLoading:boolean,
229
+ /**Load the default Open Discord startscreen. */
230
+ startScreenLoading:boolean,
231
+ /**Render the default Open Discord startscreen. */
232
+ startScreenRendering:boolean,
233
+
234
+ /**Load the emoji style from the Open Discord general config. */
235
+ emojiTitleStyleLoading:boolean,
236
+ /**The emoji style to use in embed & message titles using `utilities.emoijTitle()` */
237
+ emojiTitleStyle:"disabled"|"before"|"after"|"double",
238
+ /**The emoji divider to use in embed & message titles using `utilities.emoijTitle()` */
239
+ emojiTitleDivider:string
240
+ }
241
+
242
+ /**## ODFuseManager `class`
243
+ * This is an Open Discord fuse manager.
244
+ *
245
+ * It manages all settings in Open Discord that are not meant to be in the config.
246
+ * Here you can disable certain default features of the bot to replace them with your own implementation!
247
+ *
248
+ * You can think of them like real fuses, they disable an entire branch of the bot!
249
+ */
250
+ export class ODSharedFuseManager extends ODFuseManager<ODSharedFuseList> {
251
+ constructor(){
252
+ super({
253
+ errorHandling:true,
254
+ crashOnError:false,
255
+ debugLoading:true,
256
+ silentLoading:true,
257
+ allowDumpCommand:true,
258
+ pluginLoading:true,
259
+ softPluginLoading:false,
260
+
261
+ pluginClassLoading:true,
262
+
263
+ flagLoading:true,
264
+ flagInitiating:true,
265
+ progressBarRendererLoading:true,
266
+ progressBarLoading:true,
267
+ configLoading:true,
268
+ configInitiating:true,
269
+ databaseLoading:true,
270
+ databaseInitiating:true,
271
+ sessionLoading:true,
272
+
273
+ languageLoading:true,
274
+ languageInitiating:true,
275
+ languageSelection:true,
276
+ backupLanguage:"opendiscord:english",
277
+ languageList:[],
278
+
279
+ checkerLoading:true,
280
+ checkerFunctionLoading:true,
281
+ checkerExecution:true,
282
+ checkerTranslationLoading:true,
283
+ checkerRendering:true,
284
+ checkerQuit:true,
285
+ checkerRenderEmpty:false,
286
+
287
+ clientLoading:true,
288
+ clientInitiating:true,
289
+ clientReady:true,
290
+ clientMultiGuildWarning:true,
291
+ clientActivityLoading:true,
292
+ clientActivityInitiating:true,
293
+
294
+ priorityLoading:true,
295
+
296
+ slashCommandLoading:true,
297
+ slashCommandRegistering:true,
298
+ forceSlashCommandRegistration:false,
299
+ allowSlashCommandRemoval:true,
300
+ contextMenuLoading:true,
301
+ contextMenuRegistering:true,
302
+ forceContextMenuRegistration:false,
303
+ allowContextMenuRemoval:true,
304
+ textCommandLoading:true,
305
+
306
+ buttonBuildersLoading:true,
307
+ dropdownBuildersLoading:true,
308
+ fileBuildersLoading:true,
309
+ embedBuildersLoading:true,
310
+ messageBuildersLoading:true,
311
+ modalBuildersLoading:true,
312
+
313
+ commandRespondersLoading:true,
314
+ buttonRespondersLoading:true,
315
+ dropdownRespondersLoading:true,
316
+ modalRespondersLoading:true,
317
+ contextMenuRespondersLoading:true,
318
+ autocompleteRespondersLoading:true,
319
+ responderTimeoutMs:2500,
320
+
321
+ actionsLoading:true,
322
+
323
+ verifyBarsLoading:true,
324
+ permissionsLoading:true,
325
+ postsLoading:true,
326
+ postsInitiating:true,
327
+ cooldownsLoading:true,
328
+ cooldownsInitiating:true,
329
+ helpMenuCategoryLoading:true,
330
+ helpMenuComponentLoading:true,
331
+
332
+ statScopesLoading:true,
333
+ statLoading:true,
334
+ statInitiating:true,
335
+
336
+ codeLoading:true,
337
+ codeExecution:true,
338
+
339
+ liveStatusLoading:true,
340
+ startScreenLoading:true,
341
+ startScreenRendering:true,
342
+
343
+ emojiTitleStyleLoading:true,
344
+ emojiTitleStyle:"before",
345
+ emojiTitleDivider:" "
346
+ })
347
+ }
348
+ }