@open-discord-bots/framework 0.2.5 → 0.2.7

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 (49) hide show
  1. package/dist/api/main.js +1 -1
  2. package/dist/api/modules/action.d.ts +4 -4
  3. package/dist/api/modules/base.d.ts +12 -6
  4. package/dist/api/modules/builder.d.ts +25 -25
  5. package/dist/api/modules/checker.d.ts +7 -7
  6. package/dist/api/modules/client.d.ts +13 -13
  7. package/dist/api/modules/code.d.ts +4 -4
  8. package/dist/api/modules/config.d.ts +4 -4
  9. package/dist/api/modules/console.d.ts +4 -4
  10. package/dist/api/modules/cooldown.d.ts +4 -4
  11. package/dist/api/modules/database.d.ts +13 -13
  12. package/dist/api/modules/event.d.ts +4 -4
  13. package/dist/api/modules/flag.d.ts +4 -4
  14. package/dist/api/modules/helpmenu.d.ts +7 -7
  15. package/dist/api/modules/language.d.ts +6 -6
  16. package/dist/api/modules/permission.d.ts +4 -4
  17. package/dist/api/modules/plugin.d.ts +7 -7
  18. package/dist/api/modules/post.d.ts +4 -4
  19. package/dist/api/modules/progressbar.d.ts +8 -8
  20. package/dist/api/modules/responder.d.ts +19 -19
  21. package/dist/api/modules/session.d.ts +4 -4
  22. package/dist/api/modules/startscreen.d.ts +4 -4
  23. package/dist/api/modules/statistic.d.ts +15 -15
  24. package/dist/api/modules/verifybar.d.ts +4 -4
  25. package/package.json +1 -1
  26. package/src/api/main.ts +1 -1
  27. package/src/api/modules/action.ts +4 -4
  28. package/src/api/modules/base.ts +15 -10
  29. package/src/api/modules/builder.ts +25 -25
  30. package/src/api/modules/checker.ts +7 -7
  31. package/src/api/modules/client.ts +13 -13
  32. package/src/api/modules/code.ts +4 -4
  33. package/src/api/modules/config.ts +4 -4
  34. package/src/api/modules/console.ts +4 -4
  35. package/src/api/modules/cooldown.ts +4 -4
  36. package/src/api/modules/database.ts +13 -13
  37. package/src/api/modules/event.ts +4 -4
  38. package/src/api/modules/flag.ts +4 -4
  39. package/src/api/modules/helpmenu.ts +7 -7
  40. package/src/api/modules/language.ts +6 -6
  41. package/src/api/modules/permission.ts +4 -4
  42. package/src/api/modules/plugin.ts +7 -7
  43. package/src/api/modules/post.ts +4 -4
  44. package/src/api/modules/progressbar.ts +8 -8
  45. package/src/api/modules/responder.ts +19 -19
  46. package/src/api/modules/session.ts +4 -4
  47. package/src/api/modules/startscreen.ts +4 -4
  48. package/src/api/modules/statistic.ts +15 -15
  49. package/src/api/modules/verifybar.ts +4 -4
package/dist/api/main.js CHANGED
@@ -45,7 +45,7 @@ class ODMain {
45
45
  constructor(managers, project) {
46
46
  this.project = project;
47
47
  this.versions = managers.versions;
48
- this.versions.add(base_1.ODVersion.fromString("opendiscord:api", "v1.0.0"));
48
+ this.versions.add(base_1.ODVersion.fromString("opendiscord:api", "v0.2.7"));
49
49
  this.versions.add(base_1.ODVersion.fromString("opendiscord:livestatus", "v2.0.0"));
50
50
  this.debugfile = managers.debugfile;
51
51
  this.console = managers.console;
@@ -1,4 +1,4 @@
1
- import { ODManager, ODValidId, ODManagerData } from "./base";
1
+ import { ODManager, ODValidId, ODManagerData, ODNoGeneric } from "./base";
2
2
  import { ODWorkerManager, ODWorkerCallback } from "./worker";
3
3
  import { ODDebugger } from "./console";
4
4
  /**## ODActionImplementation `class`
@@ -36,11 +36,11 @@ export type ODActionManagerIdConstraint = Record<string, {
36
36
  */
37
37
  export declare class ODActionManager<IdList extends ODActionManagerIdConstraint = ODActionManagerIdConstraint> extends ODManager<ODAction<string, {}, {}, string>> {
38
38
  constructor(debug: ODDebugger);
39
- get<ActionId extends keyof IdList>(id: ActionId): ODAction<IdList[ActionId]["source"], IdList[ActionId]["params"], IdList[ActionId]["result"], IdList[ActionId]["workers"]>;
39
+ get<ActionId extends keyof ODNoGeneric<IdList>>(id: ActionId): ODAction<IdList[ActionId]["source"], IdList[ActionId]["params"], IdList[ActionId]["result"], IdList[ActionId]["workers"]>;
40
40
  get(id: ODValidId): ODAction<string, {}, {}, string> | null;
41
- remove<ActionId extends keyof IdList>(id: ActionId): ODAction<IdList[ActionId]["source"], IdList[ActionId]["params"], IdList[ActionId]["result"], IdList[ActionId]["workers"]>;
41
+ remove<ActionId extends keyof ODNoGeneric<IdList>>(id: ActionId): ODAction<IdList[ActionId]["source"], IdList[ActionId]["params"], IdList[ActionId]["result"], IdList[ActionId]["workers"]>;
42
42
  remove(id: ODValidId): ODAction<string, {}, {}, string> | null;
43
- exists(id: keyof IdList): boolean;
43
+ exists(id: keyof ODNoGeneric<IdList>): boolean;
44
44
  exists(id: ODValidId): boolean;
45
45
  }
46
46
  /**## ODAction `class`
@@ -17,25 +17,31 @@ export type ODValidButtonColor = "gray" | "red" | "green" | "blue";
17
17
  */
18
18
  export type ODProjectType = "openticket" | "openmoderation";
19
19
  /**## ODValidId `type`
20
- * This is a valid Open Discord identifier. It can be an `ODId` or `string`!
20
+ * A valid Open Discord identifier. It can be an `ODId` or `string`!
21
21
  *
22
22
  * You will see this type in many functions from Open Discord.
23
23
  */
24
24
  export type ODValidId = string | number | symbol | ODId;
25
25
  /**## ODValidJsonType `type`
26
- * This is a collection of all types that can be stored in a JSON file!
26
+ * A collection of all types that can be stored in a JSON file!
27
27
  *
28
28
  * list: `string`, `number`, `boolean`, `array`, `object`, `null`
29
29
  */
30
30
  export type ODValidJsonType = string | number | boolean | object | ODValidJsonType[] | null;
31
31
  /**## ODInterfaceWithPartialProperty `type`
32
- * This is a utility type to create an interface where some properties are optional!
32
+ * A utility type to create an interface where some properties are optional!
33
33
  */
34
34
  export type ODInterfaceWithPartialProperty<Interface, Key extends keyof Interface> = Omit<Interface, Key> & Partial<Pick<Interface, Key>>;
35
35
  /**## ODDiscordIdType `type`
36
36
  * A list of all available discord ID types. Used in the config checker.
37
37
  */
38
38
  export type ODDiscordIdType = "role" | "server" | "channel" | "category" | "user" | "member" | "interaction" | "message";
39
+ /**## ODNoGeneric `type`
40
+ * A utility type to remove generic index signatures from interfaces. This is required for providing autocomplete in all `IdList`'s of the `ODManagers`.
41
+ */
42
+ export type ODNoGeneric<T extends Record<string | number | symbol, any>> = {
43
+ [K in keyof T as string extends K ? never : number extends K ? never : symbol extends K ? never : K]: T[K];
44
+ };
39
45
  /**## ODId `class`
40
46
  * This is an Open Discord identifier.
41
47
  *
@@ -160,11 +166,11 @@ export type ODVersionManagerIdConstraint = Record<string, ODVersion>;
160
166
  */
161
167
  export declare class ODVersionManager<IdList extends ODVersionManagerIdConstraint = ODVersionManagerIdConstraint> extends ODManager<ODVersion> {
162
168
  constructor();
163
- get<VersionId extends keyof IdList>(id: VersionId): IdList[VersionId];
169
+ get<VersionId extends keyof ODNoGeneric<IdList>>(id: VersionId): IdList[VersionId];
164
170
  get(id: ODValidId): ODVersion | null;
165
- remove<VersionId extends keyof IdList>(id: VersionId): IdList[VersionId];
171
+ remove<VersionId extends keyof ODNoGeneric<IdList>>(id: VersionId): IdList[VersionId];
166
172
  remove(id: ODValidId): ODVersion | null;
167
- exists(id: keyof IdList): boolean;
173
+ exists(id: keyof ODNoGeneric<IdList>): boolean;
168
174
  exists(id: ODValidId): boolean;
169
175
  }
170
176
  /**## ODVersion `class`
@@ -1,4 +1,4 @@
1
- import { ODId, ODValidButtonColor, ODValidId, ODInterfaceWithPartialProperty, ODManagerWithSafety, ODManagerData } from "./base";
1
+ import { ODId, ODValidButtonColor, ODValidId, ODInterfaceWithPartialProperty, ODManagerWithSafety, ODManagerData, ODNoGeneric } from "./base";
2
2
  import * as discord from "discord.js";
3
3
  import { ODWorkerManager, ODWorkerCallback } from "./worker";
4
4
  import { ODDebugger } from "./console";
@@ -85,13 +85,13 @@ export declare class ODButtonManager<IdList extends ODButtonManagerIdConstraint
85
85
  constructor(debug: ODDebugger);
86
86
  /**Get a newline component for buttons & dropdowns! */
87
87
  getNewLine(id: ODValidId): ODComponentBuildResult;
88
- get<ButtonId extends keyof IdList>(id: ButtonId): ODButton<IdList[ButtonId]["source"], IdList[ButtonId]["params"], IdList[ButtonId]["workers"]>;
88
+ get<ButtonId extends keyof ODNoGeneric<IdList>>(id: ButtonId): ODButton<IdList[ButtonId]["source"], IdList[ButtonId]["params"], IdList[ButtonId]["workers"]>;
89
89
  get(id: ODValidId): ODButton<string, {}, string> | null;
90
- remove<ButtonId extends keyof IdList>(id: ButtonId): ODButton<IdList[ButtonId]["source"], IdList[ButtonId]["params"], IdList[ButtonId]["workers"]>;
90
+ remove<ButtonId extends keyof ODNoGeneric<IdList>>(id: ButtonId): ODButton<IdList[ButtonId]["source"], IdList[ButtonId]["params"], IdList[ButtonId]["workers"]>;
91
91
  remove(id: ODValidId): ODButton<string, {}, string> | null;
92
- exists(id: keyof IdList): boolean;
92
+ exists(id: keyof ODNoGeneric<IdList>): boolean;
93
93
  exists(id: ODValidId): boolean;
94
- getSafe<ButtonId extends keyof IdList>(id: ButtonId): ODButton<IdList[ButtonId]["source"], IdList[ButtonId]["params"], IdList[ButtonId]["workers"]>;
94
+ getSafe<ButtonId extends keyof ODNoGeneric<IdList>>(id: ButtonId): ODButton<IdList[ButtonId]["source"], IdList[ButtonId]["params"], IdList[ButtonId]["workers"]>;
95
95
  getSafe(id: ODValidId): ODButton<string, {}, string>;
96
96
  }
97
97
  /**## ODButtonData `interface`
@@ -184,13 +184,13 @@ export declare class ODDropdownManager<IdList extends ODDropdownManagerIdConstra
184
184
  constructor(debug: ODDebugger);
185
185
  /**Get a newline component for buttons & dropdowns! */
186
186
  getNewLine(id: ODValidId): ODComponentBuildResult;
187
- get<DropdownId extends keyof IdList>(id: DropdownId): ODDropdown<IdList[DropdownId]["source"], IdList[DropdownId]["params"], IdList[DropdownId]["workers"]>;
187
+ get<DropdownId extends keyof ODNoGeneric<IdList>>(id: DropdownId): ODDropdown<IdList[DropdownId]["source"], IdList[DropdownId]["params"], IdList[DropdownId]["workers"]>;
188
188
  get(id: ODValidId): ODDropdown<string, {}, string> | null;
189
- remove<DropdownId extends keyof IdList>(id: DropdownId): ODDropdown<IdList[DropdownId]["source"], IdList[DropdownId]["params"], IdList[DropdownId]["workers"]>;
189
+ remove<DropdownId extends keyof ODNoGeneric<IdList>>(id: DropdownId): ODDropdown<IdList[DropdownId]["source"], IdList[DropdownId]["params"], IdList[DropdownId]["workers"]>;
190
190
  remove(id: ODValidId): ODDropdown<string, {}, string> | null;
191
- exists(id: keyof IdList): boolean;
191
+ exists(id: keyof ODNoGeneric<IdList>): boolean;
192
192
  exists(id: ODValidId): boolean;
193
- getSafe<DropdownId extends keyof IdList>(id: DropdownId): ODDropdown<IdList[DropdownId]["source"], IdList[DropdownId]["params"], IdList[DropdownId]["workers"]>;
193
+ getSafe<DropdownId extends keyof ODNoGeneric<IdList>>(id: DropdownId): ODDropdown<IdList[DropdownId]["source"], IdList[DropdownId]["params"], IdList[DropdownId]["workers"]>;
194
194
  getSafe(id: ODValidId): ODDropdown<string, {}, string>;
195
195
  }
196
196
  /**## ODDropdownData `interface`
@@ -301,13 +301,13 @@ export type ODFileManagerIdConstraint = Record<string, {
301
301
  */
302
302
  export declare class ODFileManager<IdList extends ODFileManagerIdConstraint = ODFileManagerIdConstraint> extends ODManagerWithSafety<ODFile<string, {}, string>> {
303
303
  constructor(debug: ODDebugger);
304
- get<FileId extends keyof IdList>(id: FileId): ODFile<IdList[FileId]["source"], IdList[FileId]["params"], IdList[FileId]["workers"]>;
304
+ get<FileId extends keyof ODNoGeneric<IdList>>(id: FileId): ODFile<IdList[FileId]["source"], IdList[FileId]["params"], IdList[FileId]["workers"]>;
305
305
  get(id: ODValidId): ODFile<string, {}, string> | null;
306
- remove<FileId extends keyof IdList>(id: FileId): ODFile<IdList[FileId]["source"], IdList[FileId]["params"], IdList[FileId]["workers"]>;
306
+ remove<FileId extends keyof ODNoGeneric<IdList>>(id: FileId): ODFile<IdList[FileId]["source"], IdList[FileId]["params"], IdList[FileId]["workers"]>;
307
307
  remove(id: ODValidId): ODFile<string, {}, string> | null;
308
- exists(id: keyof IdList): boolean;
308
+ exists(id: keyof ODNoGeneric<IdList>): boolean;
309
309
  exists(id: ODValidId): boolean;
310
- getSafe<FileId extends keyof IdList>(id: FileId): ODFile<IdList[FileId]["source"], IdList[FileId]["params"], IdList[FileId]["workers"]>;
310
+ getSafe<FileId extends keyof ODNoGeneric<IdList>>(id: FileId): ODFile<IdList[FileId]["source"], IdList[FileId]["params"], IdList[FileId]["workers"]>;
311
311
  getSafe(id: ODValidId): ODFile<string, {}, string>;
312
312
  }
313
313
  /**## ODFileData `interface`
@@ -397,13 +397,13 @@ export type ODEmbedManagerIdConstraint = Record<string, {
397
397
  */
398
398
  export declare class ODEmbedManager<IdList extends ODEmbedManagerIdConstraint = ODEmbedManagerIdConstraint> extends ODManagerWithSafety<ODEmbed<string, {}, string>> {
399
399
  constructor(debug: ODDebugger);
400
- get<EmbedId extends keyof IdList>(id: EmbedId): ODEmbed<IdList[EmbedId]["source"], IdList[EmbedId]["params"], IdList[EmbedId]["workers"]>;
400
+ get<EmbedId extends keyof ODNoGeneric<IdList>>(id: EmbedId): ODEmbed<IdList[EmbedId]["source"], IdList[EmbedId]["params"], IdList[EmbedId]["workers"]>;
401
401
  get(id: ODValidId): ODEmbed<string, {}, string> | null;
402
- remove<EmbedId extends keyof IdList>(id: EmbedId): ODEmbed<IdList[EmbedId]["source"], IdList[EmbedId]["params"], IdList[EmbedId]["workers"]>;
402
+ remove<EmbedId extends keyof ODNoGeneric<IdList>>(id: EmbedId): ODEmbed<IdList[EmbedId]["source"], IdList[EmbedId]["params"], IdList[EmbedId]["workers"]>;
403
403
  remove(id: ODValidId): ODEmbed<string, {}, string> | null;
404
- exists(id: keyof IdList): boolean;
404
+ exists(id: keyof ODNoGeneric<IdList>): boolean;
405
405
  exists(id: ODValidId): boolean;
406
- getSafe<EmbedId extends keyof IdList>(id: EmbedId): ODEmbed<IdList[EmbedId]["source"], IdList[EmbedId]["params"], IdList[EmbedId]["workers"]>;
406
+ getSafe<EmbedId extends keyof ODNoGeneric<IdList>>(id: EmbedId): ODEmbed<IdList[EmbedId]["source"], IdList[EmbedId]["params"], IdList[EmbedId]["workers"]>;
407
407
  getSafe(id: ODValidId): ODEmbed<string, {}, string>;
408
408
  }
409
409
  /**## ODEmbedData `interface`
@@ -525,13 +525,13 @@ export type ODMessageManagerIdConstraint = Record<string, {
525
525
  */
526
526
  export declare class ODMessageManager<IdList extends ODMessageManagerIdConstraint = ODMessageManagerIdConstraint> extends ODManagerWithSafety<ODMessage<string, {}, string>> {
527
527
  constructor(debug: ODDebugger);
528
- get<MessageId extends keyof IdList>(id: MessageId): ODMessage<IdList[MessageId]["source"], IdList[MessageId]["params"], IdList[MessageId]["workers"]>;
528
+ get<MessageId extends keyof ODNoGeneric<IdList>>(id: MessageId): ODMessage<IdList[MessageId]["source"], IdList[MessageId]["params"], IdList[MessageId]["workers"]>;
529
529
  get(id: ODValidId): ODMessage<string, {}, string> | null;
530
- remove<MessageId extends keyof IdList>(id: MessageId): ODMessage<IdList[MessageId]["source"], IdList[MessageId]["params"], IdList[MessageId]["workers"]>;
530
+ remove<MessageId extends keyof ODNoGeneric<IdList>>(id: MessageId): ODMessage<IdList[MessageId]["source"], IdList[MessageId]["params"], IdList[MessageId]["workers"]>;
531
531
  remove(id: ODValidId): ODMessage<string, {}, string> | null;
532
- exists(id: keyof IdList): boolean;
532
+ exists(id: keyof ODNoGeneric<IdList>): boolean;
533
533
  exists(id: ODValidId): boolean;
534
- getSafe<MessageId extends keyof IdList>(id: MessageId): ODMessage<IdList[MessageId]["source"], IdList[MessageId]["params"], IdList[MessageId]["workers"]>;
534
+ getSafe<MessageId extends keyof ODNoGeneric<IdList>>(id: MessageId): ODMessage<IdList[MessageId]["source"], IdList[MessageId]["params"], IdList[MessageId]["workers"]>;
535
535
  getSafe(id: ODValidId): ODMessage<string, {}, string>;
536
536
  }
537
537
  /**## ODMessageData `interface`
@@ -658,13 +658,13 @@ export type ODModalManagerIdConstraint = Record<string, {
658
658
  */
659
659
  export declare class ODModalManager<IdList extends ODModalManagerIdConstraint = ODModalManagerIdConstraint> extends ODManagerWithSafety<ODModal<string, {}, string>> {
660
660
  constructor(debug: ODDebugger);
661
- get<ModalId extends keyof IdList>(id: ModalId): ODModal<IdList[ModalId]["source"], IdList[ModalId]["params"], IdList[ModalId]["workers"]>;
661
+ get<ModalId extends keyof ODNoGeneric<IdList>>(id: ModalId): ODModal<IdList[ModalId]["source"], IdList[ModalId]["params"], IdList[ModalId]["workers"]>;
662
662
  get(id: ODValidId): ODModal<string, {}, string> | null;
663
- remove<ModalId extends keyof IdList>(id: ModalId): ODModal<IdList[ModalId]["source"], IdList[ModalId]["params"], IdList[ModalId]["workers"]>;
663
+ remove<ModalId extends keyof ODNoGeneric<IdList>>(id: ModalId): ODModal<IdList[ModalId]["source"], IdList[ModalId]["params"], IdList[ModalId]["workers"]>;
664
664
  remove(id: ODValidId): ODModal<string, {}, string> | null;
665
- exists(id: keyof IdList): boolean;
665
+ exists(id: keyof ODNoGeneric<IdList>): boolean;
666
666
  exists(id: ODValidId): boolean;
667
- getSafe<ModalId extends keyof IdList>(id: ModalId): ODModal<IdList[ModalId]["source"], IdList[ModalId]["params"], IdList[ModalId]["workers"]>;
667
+ getSafe<ModalId extends keyof ODNoGeneric<IdList>>(id: ModalId): ODModal<IdList[ModalId]["source"], IdList[ModalId]["params"], IdList[ModalId]["workers"]>;
668
668
  getSafe(id: ODValidId): ODModal<string, {}, string>;
669
669
  }
670
670
  /**## ODModalDataQuestion `interface`
@@ -1,4 +1,4 @@
1
- import { ODDiscordIdType, ODId, ODManager, ODManagerData, ODValidId, ODValidJsonType } from "./base";
1
+ import { ODDiscordIdType, ODId, ODManager, ODManagerData, ODNoGeneric, ODValidId, ODValidJsonType } from "./base";
2
2
  import { ODConfig } from "./config";
3
3
  import { ODLanguageManager } from "./language";
4
4
  import { ODDebugger } from "./console";
@@ -36,11 +36,11 @@ export declare class ODCheckerManager<IdList extends ODCheckerManagerIdConstrain
36
36
  checkAll(sort: boolean): ODCheckerResult;
37
37
  /**Create temporary and unlisted `ODConfig`, `ODChecker` & `ODCheckerStorage` classes. This will help you use a `ODCheckerStructure` validator without officially registering it in `opendiscord.checkers`. */
38
38
  createTemporaryCheckerEnvironment(): ODChecker;
39
- get<CheckerId extends keyof IdList>(id: CheckerId): IdList[CheckerId];
39
+ get<CheckerId extends keyof ODNoGeneric<IdList>>(id: CheckerId): IdList[CheckerId];
40
40
  get(id: ODValidId): ODChecker | null;
41
- remove<CheckerId extends keyof IdList>(id: CheckerId): IdList[CheckerId];
41
+ remove<CheckerId extends keyof ODNoGeneric<IdList>>(id: CheckerId): IdList[CheckerId];
42
42
  remove(id: ODValidId): ODChecker | null;
43
- exists(id: keyof IdList): boolean;
43
+ exists(id: keyof ODNoGeneric<IdList>): boolean;
44
44
  exists(id: ODValidId): boolean;
45
45
  }
46
46
  /**## ODCheckerStorage `class`
@@ -217,11 +217,11 @@ export declare class ODCheckerFunctionManager<IdList extends ODCheckerFunctionMa
217
217
  locationTraceToString(trace: ODCheckerLocationTrace): string;
218
218
  /**De-reference the locationTrace array. Use this before adding a value to the array*/
219
219
  locationTraceDeref(trace: ODCheckerLocationTrace): ODCheckerLocationTrace;
220
- get<CheckerFunctionId extends keyof IdList>(id: CheckerFunctionId): IdList[CheckerFunctionId];
220
+ get<CheckerFunctionId extends keyof ODNoGeneric<IdList>>(id: CheckerFunctionId): IdList[CheckerFunctionId];
221
221
  get(id: ODValidId): ODCheckerFunction | null;
222
- remove<CheckerFunctionId extends keyof IdList>(id: CheckerFunctionId): IdList[CheckerFunctionId];
222
+ remove<CheckerFunctionId extends keyof ODNoGeneric<IdList>>(id: CheckerFunctionId): IdList[CheckerFunctionId];
223
223
  remove(id: ODValidId): ODCheckerFunction | null;
224
- exists(id: keyof IdList): boolean;
224
+ exists(id: keyof ODNoGeneric<IdList>): boolean;
225
225
  exists(id: ODValidId): boolean;
226
226
  }
227
227
  /**## ODCheckerLocationTrace `type`
@@ -1,4 +1,4 @@
1
- import { ODManager, ODManagerData, ODValidId } from "./base";
1
+ import { ODManager, ODManagerData, ODNoGeneric, ODValidId } from "./base";
2
2
  import * as discord from "discord.js";
3
3
  import { ODDebugger } from "./console";
4
4
  import { ODMessageBuildResult, ODMessageBuildSentResult } from "./builder";
@@ -317,13 +317,13 @@ export declare class ODSlashCommandManager<IdList extends ODSlashCommandManagerI
317
317
  /**Start listening to the discord.js client `interactionCreate` event. */
318
318
  startListeningToInteractions(): void;
319
319
  /**Callback on interaction from one or multiple slash commands. */
320
- onInteraction(commandName: Extract<keyof IdList, string>, callback: ODSlashCommandInteractionCallback): void;
320
+ onInteraction(commandName: keyof ODNoGeneric<IdList>, callback: ODSlashCommandInteractionCallback): void;
321
321
  onInteraction(commandName: string | RegExp, callback: ODSlashCommandInteractionCallback): void;
322
- get<SlashCommandId extends keyof IdList>(id: SlashCommandId): IdList[SlashCommandId];
322
+ get<SlashCommandId extends keyof ODNoGeneric<IdList>>(id: SlashCommandId): IdList[SlashCommandId];
323
323
  get(id: ODValidId): ODSlashCommand | null;
324
- remove<SlashCommandId extends keyof IdList>(id: SlashCommandId): IdList[SlashCommandId];
324
+ remove<SlashCommandId extends keyof ODNoGeneric<IdList>>(id: SlashCommandId): IdList[SlashCommandId];
325
325
  remove(id: ODValidId): ODSlashCommand | null;
326
- exists(id: keyof IdList): boolean;
326
+ exists(id: keyof ODNoGeneric<IdList>): boolean;
327
327
  exists(id: ODValidId): boolean;
328
328
  }
329
329
  /**## ODSlashCommandUpdateFunction `type`
@@ -593,15 +593,15 @@ export declare class ODTextCommandManager<IdList extends ODTextCommandManagerIdC
593
593
  /**Start listening to the discord.js client `messageCreate` event. */
594
594
  startListeningToInteractions(): void;
595
595
  /**Callback on interaction from one of the registered text commands */
596
- onInteraction(commandPrefix: string, commandName: Extract<keyof IdList, string>, callback: ODTextCommandInteractionCallback): void;
596
+ onInteraction(commandPrefix: string, commandName: keyof ODNoGeneric<IdList>, callback: ODTextCommandInteractionCallback): void;
597
597
  onInteraction(commandPrefix: string, commandName: string | RegExp, callback: ODTextCommandInteractionCallback): void;
598
598
  /**Callback on error from all the registered text commands */
599
599
  onError(callback: ODTextCommandErrorCallback): void;
600
- get<TextCommandId extends keyof IdList>(id: TextCommandId): IdList[TextCommandId];
600
+ get<TextCommandId extends keyof ODNoGeneric<IdList>>(id: TextCommandId): IdList[TextCommandId];
601
601
  get(id: ODValidId): ODTextCommand | null;
602
- remove<TextCommandId extends keyof IdList>(id: TextCommandId): IdList[TextCommandId];
602
+ remove<TextCommandId extends keyof ODNoGeneric<IdList>>(id: TextCommandId): IdList[TextCommandId];
603
603
  remove(id: ODValidId): ODTextCommand | null;
604
- exists(id: keyof IdList): boolean;
604
+ exists(id: keyof ODNoGeneric<IdList>): boolean;
605
605
  exists(id: ODValidId): boolean;
606
606
  add(data: ODTextCommand, overwrite?: boolean): boolean;
607
607
  }
@@ -732,13 +732,13 @@ export declare class ODContextMenuManager<IdList extends ODContextMenuManagerIdC
732
732
  /**Start listening to the discord.js client `interactionCreate` event. */
733
733
  startListeningToInteractions(): void;
734
734
  /**Callback on interaction from one or multiple context menu's. */
735
- onInteraction(menuName: Extract<keyof IdList, string>, callback: ODContextMenuInteractionCallback): void;
735
+ onInteraction(menuName: keyof ODNoGeneric<IdList>, callback: ODContextMenuInteractionCallback): void;
736
736
  onInteraction(menuName: string | RegExp, callback: ODContextMenuInteractionCallback): void;
737
- get<ContextMenuId extends keyof IdList>(id: ContextMenuId): IdList[ContextMenuId];
737
+ get<ContextMenuId extends keyof ODNoGeneric<IdList>>(id: ContextMenuId): IdList[ContextMenuId];
738
738
  get(id: ODValidId): ODContextMenu | null;
739
- remove<ContextMenuId extends keyof IdList>(id: ContextMenuId): IdList[ContextMenuId];
739
+ remove<ContextMenuId extends keyof ODNoGeneric<IdList>>(id: ContextMenuId): IdList[ContextMenuId];
740
740
  remove(id: ODValidId): ODContextMenu | null;
741
- exists(id: keyof IdList): boolean;
741
+ exists(id: keyof ODNoGeneric<IdList>): boolean;
742
742
  exists(id: ODValidId): boolean;
743
743
  }
744
744
  /**## ODContextMenuUpdateFunction `type`
@@ -1,4 +1,4 @@
1
- import { ODManager, ODManagerData, ODValidId } from "./base";
1
+ import { ODManager, ODManagerData, ODNoGeneric, ODValidId } from "./base";
2
2
  import { ODDebugger } from "./console";
3
3
  /**## ODCode `class`
4
4
  * This is an Open Discord code runner.
@@ -34,10 +34,10 @@ export declare class ODCodeManager<IdList extends ODCodeManagerIdConstraint = OD
34
34
  constructor(debug: ODDebugger);
35
35
  /**Execute all `ODCode` functions in order of their priority (high to low). */
36
36
  execute(): Promise<void>;
37
- get<CodeId extends keyof IdList>(id: CodeId): IdList[CodeId];
37
+ get<CodeId extends keyof ODNoGeneric<IdList>>(id: CodeId): IdList[CodeId];
38
38
  get(id: ODValidId): ODCode | null;
39
- remove<CodeId extends keyof IdList>(id: CodeId): IdList[CodeId];
39
+ remove<CodeId extends keyof ODNoGeneric<IdList>>(id: CodeId): IdList[CodeId];
40
40
  remove(id: ODValidId): ODCode | null;
41
- exists(id: keyof IdList): boolean;
41
+ exists(id: keyof ODNoGeneric<IdList>): boolean;
42
42
  exists(id: ODValidId): boolean;
43
43
  }
@@ -1,4 +1,4 @@
1
- import { ODManager, ODManagerData, ODPromiseVoid, ODValidId } from "./base";
1
+ import { ODManager, ODManagerData, ODNoGeneric, ODPromiseVoid, ODValidId } from "./base";
2
2
  import { ODDebugger } from "./console";
3
3
  import * as fjs from "formatted-json-stringify";
4
4
  /**## ODConfigManagerIdConstraint `type`
@@ -18,11 +18,11 @@ export declare class ODConfigManager<IdList extends ODConfigManagerIdConstraint
18
18
  add(data: ODConfig<any> | ODConfig<any>[], overwrite?: boolean): boolean;
19
19
  /**Init all config files. */
20
20
  init(): Promise<void>;
21
- get<ConfigId extends keyof IdList>(id: ConfigId): IdList[ConfigId];
21
+ get<ConfigId extends keyof ODNoGeneric<IdList>>(id: ConfigId): IdList[ConfigId];
22
22
  get(id: ODValidId): ODConfig<any> | null;
23
- remove<ConfigId extends keyof IdList>(id: ConfigId): IdList[ConfigId];
23
+ remove<ConfigId extends keyof ODNoGeneric<IdList>>(id: ConfigId): IdList[ConfigId];
24
24
  remove(id: ODValidId): ODConfig<any> | null;
25
- exists(id: keyof IdList): boolean;
25
+ exists(id: keyof ODNoGeneric<IdList>): boolean;
26
26
  exists(id: ODValidId): boolean;
27
27
  }
28
28
  /**## ODConfig `class`
@@ -1,4 +1,4 @@
1
- import { ODHTTPGetRequest, ODVersion, ODSystemError, ODPluginError, ODManager, ODManagerData, ODValidId } from "./base";
1
+ import { ODHTTPGetRequest, ODVersion, ODSystemError, ODPluginError, ODManager, ODManagerData, ODValidId, ODNoGeneric } from "./base";
2
2
  import { ODMain } from "../main";
3
3
  /**## ODValidConsoleColor `type`
4
4
  * This is a collection of all the supported console colors within Open Discord.
@@ -297,11 +297,11 @@ export declare class ODLiveStatusManager<IdList extends ODLiveStatusManagerIdCon
297
297
  getAllMessages(): Promise<ODLiveStatusSourceData[]>;
298
298
  /**Set the opendiscord `ODMain` class to use for fetching message filters. */
299
299
  useMain(main: ODMain): void;
300
- get<LiveStatusId extends keyof IdList>(id: LiveStatusId): IdList[LiveStatusId];
300
+ get<LiveStatusId extends keyof ODNoGeneric<IdList>>(id: LiveStatusId): IdList[LiveStatusId];
301
301
  get(id: ODValidId): ODLiveStatusSource | null;
302
- remove<LiveStatusId extends keyof IdList>(id: LiveStatusId): IdList[LiveStatusId];
302
+ remove<LiveStatusId extends keyof ODNoGeneric<IdList>>(id: LiveStatusId): IdList[LiveStatusId];
303
303
  remove(id: ODValidId): ODLiveStatusSource | null;
304
- exists(id: keyof IdList): boolean;
304
+ exists(id: keyof ODNoGeneric<IdList>): boolean;
305
305
  exists(id: ODValidId): boolean;
306
306
  }
307
307
  /**## ODLiveStatusRenderer `class`
@@ -1,4 +1,4 @@
1
- import { ODValidId, ODManager, ODManagerData } from "./base";
1
+ import { ODValidId, ODManager, ODManagerData, ODNoGeneric } from "./base";
2
2
  import { ODDebugger } from "./console";
3
3
  /**## ODCooldownManagerIdConstraint `type`
4
4
  * The constraint/layout for id mappings/interfaces of the `ODCooldownManager` class.
@@ -15,11 +15,11 @@ export declare class ODCooldownManager<IdList extends ODCooldownManagerIdConstra
15
15
  constructor(debug: ODDebugger);
16
16
  /**Initiate all cooldowns in this manager. */
17
17
  init(): Promise<void>;
18
- get<CooldownId extends keyof IdList>(id: CooldownId): IdList[CooldownId];
18
+ get<CooldownId extends keyof ODNoGeneric<IdList>>(id: CooldownId): IdList[CooldownId];
19
19
  get(id: ODValidId): ODCooldown<object> | null;
20
- remove<CooldownId extends keyof IdList>(id: CooldownId): IdList[CooldownId];
20
+ remove<CooldownId extends keyof ODNoGeneric<IdList>>(id: CooldownId): IdList[CooldownId];
21
21
  remove(id: ODValidId): ODCooldown<object> | null;
22
- exists(id: keyof IdList): boolean;
22
+ exists(id: keyof ODNoGeneric<IdList>): boolean;
23
23
  exists(id: ODValidId): boolean;
24
24
  }
25
25
  /**## ODCooldownData `class`
@@ -1,4 +1,4 @@
1
- import { ODManager, ODManagerData, ODOptionalPromise, ODPromiseVoid, ODValidId, ODValidJsonType } from "./base";
1
+ import { ODManager, ODManagerData, ODNoGeneric, ODOptionalPromise, ODPromiseVoid, ODValidId, ODValidJsonType } from "./base";
2
2
  import { ODDebugger } from "./console";
3
3
  import * as fjs from "formatted-json-stringify";
4
4
  /**## ODDatabaseManagerIdConstraint `type`
@@ -16,11 +16,11 @@ export declare class ODDatabaseManager<IdList extends ODDatabaseManagerIdConstra
16
16
  constructor(debug: ODDebugger);
17
17
  /**Init all database files. */
18
18
  init(): Promise<void>;
19
- get<DatabaseId extends keyof IdList>(id: DatabaseId): IdList[DatabaseId];
19
+ get<DatabaseId extends keyof ODNoGeneric<IdList>>(id: DatabaseId): IdList[DatabaseId];
20
20
  get(id: ODValidId): ODDatabase<{}> | null;
21
- remove<DatabaseId extends keyof IdList>(id: DatabaseId): IdList[DatabaseId];
21
+ remove<DatabaseId extends keyof ODNoGeneric<IdList>>(id: DatabaseId): IdList[DatabaseId];
22
22
  remove(id: ODValidId): ODDatabase<{}> | null;
23
- exists(id: keyof IdList): boolean;
23
+ exists(id: keyof ODNoGeneric<IdList>): boolean;
24
24
  exists(id: ODValidId): boolean;
25
25
  }
26
26
  /**## ODDatabaseIdConstraint `type`
@@ -41,19 +41,19 @@ export declare class ODDatabase<IdList extends ODDatabaseIdConstraint = ODDataba
41
41
  /**Init the database. */
42
42
  init(): ODPromiseVoid;
43
43
  /**Add/Overwrite a specific category & key in the database. Returns `true` when overwritten. */
44
- set<CategoryId extends keyof IdList>(category: CategoryId, key: string, value: IdList[CategoryId]): ODOptionalPromise<boolean>;
44
+ set<CategoryId extends keyof ODNoGeneric<IdList>>(category: CategoryId, key: string, value: IdList[CategoryId]): ODOptionalPromise<boolean>;
45
45
  set(category: string, key: string, value: ODValidJsonType): ODOptionalPromise<boolean>;
46
46
  /**Get a specific category & key in the database */
47
- get<CategoryId extends keyof IdList>(category: CategoryId, key: string): ODOptionalPromise<IdList[CategoryId] | undefined>;
47
+ get<CategoryId extends keyof ODNoGeneric<IdList>>(category: CategoryId, key: string): ODOptionalPromise<IdList[CategoryId] | undefined>;
48
48
  get(category: string, key: string): ODOptionalPromise<ODValidJsonType | undefined>;
49
49
  /**Delete a specific category & key in the database */
50
- delete<CategoryId extends keyof IdList>(category: CategoryId, key: string): ODOptionalPromise<boolean>;
50
+ delete<CategoryId extends keyof ODNoGeneric<IdList>>(category: CategoryId, key: string): ODOptionalPromise<boolean>;
51
51
  delete(category: string, key: string): ODOptionalPromise<boolean>;
52
52
  /**Check if a specific category & key exists in the database */
53
- exists(category: keyof IdList, key: string): ODOptionalPromise<boolean>;
53
+ exists(category: keyof ODNoGeneric<IdList>, key: string): ODOptionalPromise<boolean>;
54
54
  exists(category: string, key: string): ODOptionalPromise<boolean>;
55
55
  /**Get a specific category in the database */
56
- getCategory<CategoryId extends keyof IdList>(category: CategoryId): ODOptionalPromise<{
56
+ getCategory<CategoryId extends keyof ODNoGeneric<IdList>>(category: CategoryId): ODOptionalPromise<{
57
57
  key: string;
58
58
  value: IdList[CategoryId];
59
59
  }[] | undefined>;
@@ -95,7 +95,7 @@ export declare class ODJsonDatabase<IdList extends ODDatabaseIdConstraint = ODDa
95
95
  * const data = database.getData("category","key") //data will be the value
96
96
  * //You need an ODJsonDatabase class named "database" for this example to work!
97
97
  */
98
- get<CategoryId extends keyof IdList>(category: CategoryId, key: string): ODOptionalPromise<IdList[CategoryId] | undefined>;
98
+ get<CategoryId extends keyof ODNoGeneric<IdList>>(category: CategoryId, key: string): ODOptionalPromise<IdList[CategoryId] | undefined>;
99
99
  get(category: string, key: string): ODOptionalPromise<ODValidJsonType | undefined>;
100
100
  /**Remove the value of `category` & `key`. Returns `undefined` when non-existent!
101
101
  * @example
@@ -106,7 +106,7 @@ export declare class ODJsonDatabase<IdList extends ODDatabaseIdConstraint = ODDa
106
106
  /**Check if a value of `category` & `key` exists. Returns `false` when non-existent! */
107
107
  exists(category: string, key: string): ODOptionalPromise<boolean>;
108
108
  /**Get all values in `category`. Returns `undefined` when non-existent! */
109
- getCategory<CategoryId extends keyof IdList>(category: CategoryId): ODOptionalPromise<{
109
+ getCategory<CategoryId extends keyof ODNoGeneric<IdList>>(category: CategoryId): ODOptionalPromise<{
110
110
  key: string;
111
111
  value: IdList[CategoryId];
112
112
  }[] | undefined>;
@@ -143,7 +143,7 @@ export declare class ODFormattedJsonDatabase<IdList extends ODDatabaseIdConstrai
143
143
  * const data = database.getData("category","key") //data will be the value
144
144
  * //You need an ODFormattedJsonDatabase class named "database" for this example to work!
145
145
  */
146
- get<CategoryId extends keyof IdList>(category: CategoryId, key: string): ODOptionalPromise<IdList[CategoryId] | undefined>;
146
+ get<CategoryId extends keyof ODNoGeneric<IdList>>(category: CategoryId, key: string): ODOptionalPromise<IdList[CategoryId] | undefined>;
147
147
  get(category: string, key: string): ODOptionalPromise<ODValidJsonType | undefined>;
148
148
  /**Remove the value of `category` & `key`. Returns `undefined` when non-existent!
149
149
  * @example
@@ -154,7 +154,7 @@ export declare class ODFormattedJsonDatabase<IdList extends ODDatabaseIdConstrai
154
154
  /**Check if a value of `category` & `key` exists. Returns `false` when non-existent! */
155
155
  exists(category: string, key: string): ODOptionalPromise<boolean>;
156
156
  /**Get all values in `category`. Returns `undefined` when non-existent! */
157
- getCategory<CategoryId extends keyof IdList>(category: CategoryId): ODOptionalPromise<{
157
+ getCategory<CategoryId extends keyof ODNoGeneric<IdList>>(category: CategoryId): ODOptionalPromise<{
158
158
  key: string;
159
159
  value: IdList[CategoryId];
160
160
  }[] | undefined>;
@@ -1,4 +1,4 @@
1
- import { ODManagerData, ODManager, ODValidId, ODPromiseVoid } from "./base";
1
+ import { ODManagerData, ODManager, ODValidId, ODPromiseVoid, ODNoGeneric } from "./base";
2
2
  import { ODDebugger } from "./console";
3
3
  /**## ODEventCallback `type`
4
4
  * The base callback function for events.
@@ -47,10 +47,10 @@ export declare class ODEventManager<IdList extends ODEventManagerIdConstraint =
47
47
  #private;
48
48
  constructor(debug: ODDebugger);
49
49
  add(data: ODEvent, overwrite?: boolean): boolean;
50
- get<EventId extends keyof IdList>(id: EventId): IdList[EventId];
50
+ get<EventId extends keyof ODNoGeneric<IdList>>(id: EventId): IdList[EventId];
51
51
  get(id: ODValidId): ODEvent | null;
52
- remove<EventId extends keyof IdList>(id: EventId): IdList[EventId];
52
+ remove<EventId extends keyof ODNoGeneric<IdList>>(id: EventId): IdList[EventId];
53
53
  remove(id: ODValidId): ODEvent | null;
54
- exists(id: keyof IdList): boolean;
54
+ exists(id: keyof ODNoGeneric<IdList>): boolean;
55
55
  exists(id: ODValidId): boolean;
56
56
  }
@@ -1,4 +1,4 @@
1
- import { ODValidId, ODManager, ODManagerData } from "./base";
1
+ import { ODValidId, ODManager, ODManagerData, ODNoGeneric } from "./base";
2
2
  import { ODDebugger } from "./console";
3
3
  /**## ODFlag `class`
4
4
  * This is an Open Discord flag.
@@ -41,10 +41,10 @@ export declare class ODFlagManager<IdList extends ODFlagManagerIdConstraint = OD
41
41
  constructor(debug: ODDebugger);
42
42
  /**Set all flags to their `process.argv` value. */
43
43
  init(): Promise<void>;
44
- get<FlagId extends keyof IdList>(id: FlagId): IdList[FlagId];
44
+ get<FlagId extends keyof ODNoGeneric<IdList>>(id: FlagId): IdList[FlagId];
45
45
  get(id: ODValidId): ODFlag | null;
46
- remove<FlagId extends keyof IdList>(id: FlagId): IdList[FlagId];
46
+ remove<FlagId extends keyof ODNoGeneric<IdList>>(id: FlagId): IdList[FlagId];
47
47
  remove(id: ODValidId): ODFlag | null;
48
- exists(id: keyof IdList): boolean;
48
+ exists(id: keyof ODNoGeneric<IdList>): boolean;
49
49
  exists(id: ODValidId): boolean;
50
50
  }
@@ -1,4 +1,4 @@
1
- import { ODId, ODManager, ODManagerData, ODValidId } from "./base";
1
+ import { ODId, ODManager, ODManagerData, ODNoGeneric, ODValidId } from "./base";
2
2
  import { ODDebugger } from "./console";
3
3
  /**## ODHelpMenuComponentRenderer `type`
4
4
  * This is the callback of the help menu component renderer. It also contains information about how & where it is rendered.
@@ -81,11 +81,11 @@ export declare class ODHelpMenuCategory<IdList extends ODHelpMenuCategoryIdConst
81
81
  constructor(id: ODValidId, priority: number, name: string, newPage?: boolean);
82
82
  /**Render this category and it's components. */
83
83
  render(page: number, category: number, mode: "slash" | "text"): Promise<string>;
84
- get<HelpMenuComponentId extends keyof IdList>(id: HelpMenuComponentId): IdList[HelpMenuComponentId];
84
+ get<HelpMenuComponentId extends keyof ODNoGeneric<IdList>>(id: HelpMenuComponentId): IdList[HelpMenuComponentId];
85
85
  get(id: ODValidId): ODHelpMenuComponent | null;
86
- remove<HelpMenuComponentId extends keyof IdList>(id: HelpMenuComponentId): IdList[HelpMenuComponentId];
86
+ remove<HelpMenuComponentId extends keyof ODNoGeneric<IdList>>(id: HelpMenuComponentId): IdList[HelpMenuComponentId];
87
87
  remove(id: ODValidId): ODHelpMenuComponent | null;
88
- exists(id: keyof IdList): boolean;
88
+ exists(id: keyof ODNoGeneric<IdList>): boolean;
89
89
  exists(id: ODValidId): boolean;
90
90
  }
91
91
  /**## ODHelpMenuRenderResult `type`
@@ -117,10 +117,10 @@ export declare class ODHelpMenuManager<IdList extends ODHelpMenuManagerIdConstra
117
117
  add(data: ODHelpMenuCategory, overwrite?: boolean): boolean;
118
118
  /**Render this entire help menu & return a `ODHelpMenuRenderResult`. */
119
119
  render(mode: "slash" | "text"): Promise<ODHelpMenuRenderResult>;
120
- get<HelpMenuCategoryId extends keyof IdList>(id: HelpMenuCategoryId): IdList[HelpMenuCategoryId];
120
+ get<HelpMenuCategoryId extends keyof ODNoGeneric<IdList>>(id: HelpMenuCategoryId): IdList[HelpMenuCategoryId];
121
121
  get(id: ODValidId): ODHelpMenuCategory | null;
122
- remove<HelpMenuCategoryId extends keyof IdList>(id: HelpMenuCategoryId): IdList[HelpMenuCategoryId];
122
+ remove<HelpMenuCategoryId extends keyof ODNoGeneric<IdList>>(id: HelpMenuCategoryId): IdList[HelpMenuCategoryId];
123
123
  remove(id: ODValidId): ODHelpMenuCategory | null;
124
- exists(id: keyof IdList): boolean;
124
+ exists(id: keyof ODNoGeneric<IdList>): boolean;
125
125
  exists(id: ODValidId): boolean;
126
126
  }
@@ -1,4 +1,4 @@
1
- import { ODManager, ODManagerData, ODPromiseVoid, ODValidId } from "./base";
1
+ import { ODManager, ODManagerData, ODNoGeneric, ODPromiseVoid, ODValidId } from "./base";
2
2
  import { ODDebugger } from "./console";
3
3
  /**## ODLanguageMetadata `interface`
4
4
  * This interface contains all metadata available in the language files.
@@ -35,12 +35,12 @@ export declare class ODLanguageManager<IdList extends ODLanguageManagerIdConstra
35
35
  backup: ODLanguage | null;
36
36
  constructor(debug: ODDebugger, presets: boolean);
37
37
  /**Set the current language by providing the ID of a language which is registered in this manager. */
38
- setCurrentLanguage(id: keyof IdList): void;
38
+ setCurrentLanguage(id: keyof ODNoGeneric<IdList>): void;
39
39
  setCurrentLanguage(id: ODValidId): void;
40
40
  /**Get the current language (same as `this.current`) */
41
41
  getCurrentLanguage(): ODLanguage | null;
42
42
  /**Set the backup language by providing the ID of a language which is registered in this manager. */
43
- setBackupLanguage(id: keyof IdList): void;
43
+ setBackupLanguage(id: keyof ODNoGeneric<IdList>): void;
44
44
  setBackupLanguage(id: ODValidId): void;
45
45
  /**Get the backup language (same as `this.backup`) */
46
46
  getBackupLanguage(): ODLanguage | null;
@@ -56,11 +56,11 @@ export declare class ODLanguageManager<IdList extends ODLanguageManagerIdConstra
56
56
  getTranslationWithParams(id: string, params: string[]): string | null;
57
57
  /**Init all language files. */
58
58
  init(): Promise<void>;
59
- get<LanguageId extends keyof IdList>(id: LanguageId): IdList[LanguageId];
59
+ get<LanguageId extends keyof ODNoGeneric<IdList>>(id: LanguageId): IdList[LanguageId];
60
60
  get(id: ODValidId): ODLanguage | null;
61
- remove<LanguageId extends keyof IdList>(id: LanguageId): IdList[LanguageId];
61
+ remove<LanguageId extends keyof ODNoGeneric<IdList>>(id: LanguageId): IdList[LanguageId];
62
62
  remove(id: ODValidId): ODLanguage | null;
63
- exists(id: keyof IdList): boolean;
63
+ exists(id: keyof ODNoGeneric<IdList>): boolean;
64
64
  exists(id: ODValidId): boolean;
65
65
  }
66
66
  /**## ODLanguage `class`
@@ -1,4 +1,4 @@
1
- import { ODValidId, ODManager, ODManagerData } from "./base";
1
+ import { ODValidId, ODManager, ODManagerData, ODNoGeneric } from "./base";
2
2
  import * as discord from "discord.js";
3
3
  import { ODDebugger } from "./console";
4
4
  import { ODClientManager } from "./client";
@@ -122,10 +122,10 @@ export declare class ODPermissionManager<IdList extends ODPermissionManagerIdCon
122
122
  hasPermissions(minimum: ODPermissionType, data: ODPermissionResult): boolean;
123
123
  /**Check the permissions for a certain command of the bot. */
124
124
  checkCommandPerms(permissionMode: string, requiredLevel: ODPermissionType, user: discord.User, member?: discord.GuildMember | null, channel?: discord.Channel | null, guild?: discord.Guild | null, settings?: ODPermissionSettings): Promise<ODPermissionCommandResult>;
125
- get<PermissionId extends keyof IdList>(id: PermissionId): IdList[PermissionId];
125
+ get<PermissionId extends keyof ODNoGeneric<IdList>>(id: PermissionId): IdList[PermissionId];
126
126
  get(id: ODValidId): ODPermission | null;
127
- remove<PermissionId extends keyof IdList>(id: PermissionId): IdList[PermissionId];
127
+ remove<PermissionId extends keyof ODNoGeneric<IdList>>(id: PermissionId): IdList[PermissionId];
128
128
  remove(id: ODValidId): ODPermission | null;
129
- exists(id: keyof IdList): boolean;
129
+ exists(id: keyof ODNoGeneric<IdList>): boolean;
130
130
  exists(id: ODValidId): boolean;
131
131
  }