@open-discord-bots/framework 0.2.4 → 0.2.6

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 (61) hide show
  1. package/README.md +1 -1
  2. package/dist/api/index.d.ts +1 -1
  3. package/dist/api/index.js +1 -1
  4. package/dist/api/main.d.ts +3 -3
  5. package/dist/api/main.js +2 -2
  6. package/dist/api/modules/action.d.ts +4 -4
  7. package/dist/api/modules/base.d.ts +12 -6
  8. package/dist/api/modules/builder.d.ts +25 -25
  9. package/dist/api/modules/checker.d.ts +7 -7
  10. package/dist/api/modules/client.d.ts +13 -13
  11. package/dist/api/modules/code.d.ts +5 -5
  12. package/dist/api/modules/code.js +1 -1
  13. package/dist/api/modules/config.d.ts +4 -4
  14. package/dist/api/modules/console.d.ts +4 -4
  15. package/dist/api/modules/console.js +2 -2
  16. package/dist/api/modules/cooldown.d.ts +4 -4
  17. package/dist/api/modules/database.d.ts +13 -13
  18. package/dist/api/modules/event.d.ts +4 -4
  19. package/dist/api/modules/flag.d.ts +4 -4
  20. package/dist/api/modules/fuse.d.ts +6 -6
  21. package/dist/api/modules/fuse.js +3 -3
  22. package/dist/api/modules/helpmenu.d.ts +7 -7
  23. package/dist/api/modules/language.d.ts +6 -6
  24. package/dist/api/modules/permission.d.ts +4 -4
  25. package/dist/api/modules/plugin.d.ts +7 -7
  26. package/dist/api/modules/post.d.ts +4 -4
  27. package/dist/api/modules/progressbar.d.ts +7 -7
  28. package/dist/api/modules/responder.d.ts +19 -19
  29. package/dist/api/modules/session.d.ts +4 -4
  30. package/dist/api/modules/startscreen.d.ts +4 -4
  31. package/dist/api/modules/statistic.d.ts +176 -0
  32. package/dist/api/modules/{stat.js → statistic.js} +52 -52
  33. package/dist/api/modules/verifybar.d.ts +4 -4
  34. package/package.json +1 -1
  35. package/src/api/index.ts +1 -1
  36. package/src/api/main.ts +14 -14
  37. package/src/api/modules/action.ts +4 -4
  38. package/src/api/modules/base.ts +15 -10
  39. package/src/api/modules/builder.ts +25 -25
  40. package/src/api/modules/checker.ts +7 -7
  41. package/src/api/modules/client.ts +13 -13
  42. package/src/api/modules/code.ts +5 -5
  43. package/src/api/modules/config.ts +4 -4
  44. package/src/api/modules/console.ts +6 -6
  45. package/src/api/modules/cooldown.ts +4 -4
  46. package/src/api/modules/database.ts +13 -13
  47. package/src/api/modules/event.ts +4 -4
  48. package/src/api/modules/flag.ts +4 -4
  49. package/src/api/modules/fuse.ts +9 -9
  50. package/src/api/modules/helpmenu.ts +7 -7
  51. package/src/api/modules/language.ts +6 -6
  52. package/src/api/modules/permission.ts +4 -4
  53. package/src/api/modules/plugin.ts +7 -7
  54. package/src/api/modules/post.ts +4 -4
  55. package/src/api/modules/progressbar.ts +7 -7
  56. package/src/api/modules/responder.ts +19 -19
  57. package/src/api/modules/session.ts +4 -4
  58. package/src/api/modules/startscreen.ts +4 -4
  59. package/src/api/modules/{stat.ts → statistic.ts} +117 -117
  60. package/src/api/modules/verifybar.ts +4 -4
  61. package/dist/api/modules/stat.d.ts +0 -176
@@ -1,7 +1,7 @@
1
1
  ///////////////////////////////////////
2
2
  //BUILDER MODULE
3
3
  ///////////////////////////////////////
4
- import { ODId, ODValidButtonColor, ODValidId, ODSystemError, ODInterfaceWithPartialProperty, ODManagerWithSafety, ODManagerData } from "./base"
4
+ import { ODId, ODValidButtonColor, ODValidId, ODSystemError, ODInterfaceWithPartialProperty, ODManagerWithSafety, ODManagerData, ODNoGeneric } from "./base"
5
5
  import * as discord from "discord.js"
6
6
  import { ODWorkerManager, ODWorkerCallback, ODWorker } from "./worker"
7
7
  import { ODDebugger } from "./console"
@@ -137,28 +137,28 @@ export class ODButtonManager<IdList extends ODButtonManagerIdConstraint = ODButt
137
137
  }
138
138
  }
139
139
 
140
- get<ButtonId extends keyof IdList>(id:ButtonId): ODButton<IdList[ButtonId]["source"],IdList[ButtonId]["params"],IdList[ButtonId]["workers"]>
140
+ get<ButtonId extends keyof ODNoGeneric<IdList>>(id:ButtonId): ODButton<IdList[ButtonId]["source"],IdList[ButtonId]["params"],IdList[ButtonId]["workers"]>
141
141
  get(id:ODValidId): ODButton<string,{},string>|null
142
142
 
143
143
  get(id:ODValidId): ODButton<string,{},string>|null {
144
144
  return super.get(id)
145
145
  }
146
146
 
147
- remove<ButtonId extends keyof IdList>(id:ButtonId): ODButton<IdList[ButtonId]["source"],IdList[ButtonId]["params"],IdList[ButtonId]["workers"]>
147
+ remove<ButtonId extends keyof ODNoGeneric<IdList>>(id:ButtonId): ODButton<IdList[ButtonId]["source"],IdList[ButtonId]["params"],IdList[ButtonId]["workers"]>
148
148
  remove(id:ODValidId): ODButton<string,{},string>|null
149
149
 
150
150
  remove(id:ODValidId): ODButton<string,{},string>|null {
151
151
  return super.remove(id)
152
152
  }
153
153
 
154
- exists(id:keyof IdList): boolean
154
+ exists(id:keyof ODNoGeneric<IdList>): boolean
155
155
  exists(id:ODValidId): boolean
156
156
 
157
157
  exists(id:ODValidId): boolean {
158
158
  return super.exists(id)
159
159
  }
160
160
 
161
- getSafe<ButtonId extends keyof IdList>(id:ButtonId): ODButton<IdList[ButtonId]["source"],IdList[ButtonId]["params"],IdList[ButtonId]["workers"]>
161
+ getSafe<ButtonId extends keyof ODNoGeneric<IdList>>(id:ButtonId): ODButton<IdList[ButtonId]["source"],IdList[ButtonId]["params"],IdList[ButtonId]["workers"]>
162
162
  getSafe(id:ODValidId): ODButton<string,{},string>
163
163
 
164
164
  getSafe(id:ODValidId): ODButton<string,{},string> {
@@ -367,28 +367,28 @@ export class ODDropdownManager<IdList extends ODDropdownManagerIdConstraint = OD
367
367
  }
368
368
  }
369
369
 
370
- get<DropdownId extends keyof IdList>(id:DropdownId): ODDropdown<IdList[DropdownId]["source"],IdList[DropdownId]["params"],IdList[DropdownId]["workers"]>
370
+ get<DropdownId extends keyof ODNoGeneric<IdList>>(id:DropdownId): ODDropdown<IdList[DropdownId]["source"],IdList[DropdownId]["params"],IdList[DropdownId]["workers"]>
371
371
  get(id:ODValidId): ODDropdown<string,{},string>|null
372
372
 
373
373
  get(id:ODValidId): ODDropdown<string,{},string>|null {
374
374
  return super.get(id)
375
375
  }
376
376
 
377
- remove<DropdownId extends keyof IdList>(id:DropdownId): ODDropdown<IdList[DropdownId]["source"],IdList[DropdownId]["params"],IdList[DropdownId]["workers"]>
377
+ remove<DropdownId extends keyof ODNoGeneric<IdList>>(id:DropdownId): ODDropdown<IdList[DropdownId]["source"],IdList[DropdownId]["params"],IdList[DropdownId]["workers"]>
378
378
  remove(id:ODValidId): ODDropdown<string,{},string>|null
379
379
 
380
380
  remove(id:ODValidId): ODDropdown<string,{},string>|null {
381
381
  return super.remove(id)
382
382
  }
383
383
 
384
- exists(id:keyof IdList): boolean
384
+ exists(id:keyof ODNoGeneric<IdList>): boolean
385
385
  exists(id:ODValidId): boolean
386
386
 
387
387
  exists(id:ODValidId): boolean {
388
388
  return super.exists(id)
389
389
  }
390
390
 
391
- getSafe<DropdownId extends keyof IdList>(id:DropdownId): ODDropdown<IdList[DropdownId]["source"],IdList[DropdownId]["params"],IdList[DropdownId]["workers"]>
391
+ getSafe<DropdownId extends keyof ODNoGeneric<IdList>>(id:DropdownId): ODDropdown<IdList[DropdownId]["source"],IdList[DropdownId]["params"],IdList[DropdownId]["workers"]>
392
392
  getSafe(id:ODValidId): ODDropdown<string,{},string>
393
393
 
394
394
  getSafe(id:ODValidId): ODDropdown<string,{},string> {
@@ -745,28 +745,28 @@ export class ODFileManager<IdList extends ODFileManagerIdConstraint = ODFileMana
745
745
  },debug,"file")
746
746
  }
747
747
 
748
- get<FileId extends keyof IdList>(id:FileId): ODFile<IdList[FileId]["source"],IdList[FileId]["params"],IdList[FileId]["workers"]>
748
+ get<FileId extends keyof ODNoGeneric<IdList>>(id:FileId): ODFile<IdList[FileId]["source"],IdList[FileId]["params"],IdList[FileId]["workers"]>
749
749
  get(id:ODValidId): ODFile<string,{},string>|null
750
750
 
751
751
  get(id:ODValidId): ODFile<string,{},string>|null {
752
752
  return super.get(id)
753
753
  }
754
754
 
755
- remove<FileId extends keyof IdList>(id:FileId): ODFile<IdList[FileId]["source"],IdList[FileId]["params"],IdList[FileId]["workers"]>
755
+ remove<FileId extends keyof ODNoGeneric<IdList>>(id:FileId): ODFile<IdList[FileId]["source"],IdList[FileId]["params"],IdList[FileId]["workers"]>
756
756
  remove(id:ODValidId): ODFile<string,{},string>|null
757
757
 
758
758
  remove(id:ODValidId): ODFile<string,{},string>|null {
759
759
  return super.remove(id)
760
760
  }
761
761
 
762
- exists(id:keyof IdList): boolean
762
+ exists(id:keyof ODNoGeneric<IdList>): boolean
763
763
  exists(id:ODValidId): boolean
764
764
 
765
765
  exists(id:ODValidId): boolean {
766
766
  return super.exists(id)
767
767
  }
768
768
 
769
- getSafe<FileId extends keyof IdList>(id:FileId): ODFile<IdList[FileId]["source"],IdList[FileId]["params"],IdList[FileId]["workers"]>
769
+ getSafe<FileId extends keyof ODNoGeneric<IdList>>(id:FileId): ODFile<IdList[FileId]["source"],IdList[FileId]["params"],IdList[FileId]["workers"]>
770
770
  getSafe(id:ODValidId): ODFile<string,{},string>
771
771
 
772
772
  getSafe(id:ODValidId): ODFile<string,{},string> {
@@ -939,28 +939,28 @@ export class ODEmbedManager<IdList extends ODEmbedManagerIdConstraint = ODEmbedM
939
939
  },debug,"embed")
940
940
  }
941
941
 
942
- get<EmbedId extends keyof IdList>(id:EmbedId): ODEmbed<IdList[EmbedId]["source"],IdList[EmbedId]["params"],IdList[EmbedId]["workers"]>
942
+ get<EmbedId extends keyof ODNoGeneric<IdList>>(id:EmbedId): ODEmbed<IdList[EmbedId]["source"],IdList[EmbedId]["params"],IdList[EmbedId]["workers"]>
943
943
  get(id:ODValidId): ODEmbed<string,{},string>|null
944
944
 
945
945
  get(id:ODValidId): ODEmbed<string,{},string>|null {
946
946
  return super.get(id)
947
947
  }
948
948
 
949
- remove<EmbedId extends keyof IdList>(id:EmbedId): ODEmbed<IdList[EmbedId]["source"],IdList[EmbedId]["params"],IdList[EmbedId]["workers"]>
949
+ remove<EmbedId extends keyof ODNoGeneric<IdList>>(id:EmbedId): ODEmbed<IdList[EmbedId]["source"],IdList[EmbedId]["params"],IdList[EmbedId]["workers"]>
950
950
  remove(id:ODValidId): ODEmbed<string,{},string>|null
951
951
 
952
952
  remove(id:ODValidId): ODEmbed<string,{},string>|null {
953
953
  return super.remove(id)
954
954
  }
955
955
 
956
- exists(id:keyof IdList): boolean
956
+ exists(id:keyof ODNoGeneric<IdList>): boolean
957
957
  exists(id:ODValidId): boolean
958
958
 
959
959
  exists(id:ODValidId): boolean {
960
960
  return super.exists(id)
961
961
  }
962
962
 
963
- getSafe<EmbedId extends keyof IdList>(id:EmbedId): ODEmbed<IdList[EmbedId]["source"],IdList[EmbedId]["params"],IdList[EmbedId]["workers"]>
963
+ getSafe<EmbedId extends keyof ODNoGeneric<IdList>>(id:EmbedId): ODEmbed<IdList[EmbedId]["source"],IdList[EmbedId]["params"],IdList[EmbedId]["workers"]>
964
964
  getSafe(id:ODValidId): ODEmbed<string,{},string>
965
965
 
966
966
  getSafe(id:ODValidId): ODEmbed<string,{},string> {
@@ -1234,28 +1234,28 @@ export class ODMessageManager<IdList extends ODMessageManagerIdConstraint = ODMe
1234
1234
  },debug,"message")
1235
1235
  }
1236
1236
 
1237
- get<MessageId extends keyof IdList>(id:MessageId): ODMessage<IdList[MessageId]["source"],IdList[MessageId]["params"],IdList[MessageId]["workers"]>
1237
+ get<MessageId extends keyof ODNoGeneric<IdList>>(id:MessageId): ODMessage<IdList[MessageId]["source"],IdList[MessageId]["params"],IdList[MessageId]["workers"]>
1238
1238
  get(id:ODValidId): ODMessage<string,{},string>|null
1239
1239
 
1240
1240
  get(id:ODValidId): ODMessage<string,{},string>|null {
1241
1241
  return super.get(id)
1242
1242
  }
1243
1243
 
1244
- remove<MessageId extends keyof IdList>(id:MessageId): ODMessage<IdList[MessageId]["source"],IdList[MessageId]["params"],IdList[MessageId]["workers"]>
1244
+ remove<MessageId extends keyof ODNoGeneric<IdList>>(id:MessageId): ODMessage<IdList[MessageId]["source"],IdList[MessageId]["params"],IdList[MessageId]["workers"]>
1245
1245
  remove(id:ODValidId): ODMessage<string,{},string>|null
1246
1246
 
1247
1247
  remove(id:ODValidId): ODMessage<string,{},string>|null {
1248
1248
  return super.remove(id)
1249
1249
  }
1250
1250
 
1251
- exists(id:keyof IdList): boolean
1251
+ exists(id:keyof ODNoGeneric<IdList>): boolean
1252
1252
  exists(id:ODValidId): boolean
1253
1253
 
1254
1254
  exists(id:ODValidId): boolean {
1255
1255
  return super.exists(id)
1256
1256
  }
1257
1257
 
1258
- getSafe<MessageId extends keyof IdList>(id:MessageId): ODMessage<IdList[MessageId]["source"],IdList[MessageId]["params"],IdList[MessageId]["workers"]>
1258
+ getSafe<MessageId extends keyof ODNoGeneric<IdList>>(id:MessageId): ODMessage<IdList[MessageId]["source"],IdList[MessageId]["params"],IdList[MessageId]["workers"]>
1259
1259
  getSafe(id:ODValidId): ODMessage<string,{},string>
1260
1260
 
1261
1261
  getSafe(id:ODValidId): ODMessage<string,{},string> {
@@ -1589,28 +1589,28 @@ export class ODModalManager<IdList extends ODModalManagerIdConstraint = ODModalM
1589
1589
  },debug,"modal")
1590
1590
  }
1591
1591
 
1592
- get<ModalId extends keyof IdList>(id:ModalId): ODModal<IdList[ModalId]["source"],IdList[ModalId]["params"],IdList[ModalId]["workers"]>
1592
+ get<ModalId extends keyof ODNoGeneric<IdList>>(id:ModalId): ODModal<IdList[ModalId]["source"],IdList[ModalId]["params"],IdList[ModalId]["workers"]>
1593
1593
  get(id:ODValidId): ODModal<string,{},string>|null
1594
1594
 
1595
1595
  get(id:ODValidId): ODModal<string,{},string>|null {
1596
1596
  return super.get(id)
1597
1597
  }
1598
1598
 
1599
- remove<ModalId extends keyof IdList>(id:ModalId): ODModal<IdList[ModalId]["source"],IdList[ModalId]["params"],IdList[ModalId]["workers"]>
1599
+ remove<ModalId extends keyof ODNoGeneric<IdList>>(id:ModalId): ODModal<IdList[ModalId]["source"],IdList[ModalId]["params"],IdList[ModalId]["workers"]>
1600
1600
  remove(id:ODValidId): ODModal<string,{},string>|null
1601
1601
 
1602
1602
  remove(id:ODValidId): ODModal<string,{},string>|null {
1603
1603
  return super.remove(id)
1604
1604
  }
1605
1605
 
1606
- exists(id:keyof IdList): boolean
1606
+ exists(id:keyof ODNoGeneric<IdList>): boolean
1607
1607
  exists(id:ODValidId): boolean
1608
1608
 
1609
1609
  exists(id:ODValidId): boolean {
1610
1610
  return super.exists(id)
1611
1611
  }
1612
1612
 
1613
- getSafe<ModalId extends keyof IdList>(id:ModalId): ODModal<IdList[ModalId]["source"],IdList[ModalId]["params"],IdList[ModalId]["workers"]>
1613
+ getSafe<ModalId extends keyof ODNoGeneric<IdList>>(id:ModalId): ODModal<IdList[ModalId]["source"],IdList[ModalId]["params"],IdList[ModalId]["workers"]>
1614
1614
  getSafe(id:ODValidId): ODModal<string,{},string>
1615
1615
 
1616
1616
  getSafe(id:ODValidId): ODModal<string,{},string> {
@@ -1,7 +1,7 @@
1
1
  ///////////////////////////////////////
2
2
  //CONFIG CHECKER MODULE
3
3
  ///////////////////////////////////////
4
- import { ODDiscordIdType, ODId, ODManager, ODManagerData, ODValidId, ODValidJsonType } from "./base"
4
+ import { ODDiscordIdType, ODId, ODManager, ODManagerData, ODNoGeneric, ODValidId, ODValidJsonType } from "./base"
5
5
  import { ODConfig } from "./config"
6
6
  import { ODLanguageManager } from "./language"
7
7
  import { ODDebugger } from "./console"
@@ -99,21 +99,21 @@ export class ODCheckerManager<
99
99
  return new ODChecker("opendiscord:temporary-environment",new ODCheckerStorage(),0,new ODConfig("opendiscord:temporary-environment",{}),new ODCheckerStructure("opendiscord:temporary-environment",{}))
100
100
  }
101
101
 
102
- get<CheckerId extends keyof IdList>(id:CheckerId): IdList[CheckerId]
102
+ get<CheckerId extends keyof ODNoGeneric<IdList>>(id:CheckerId): IdList[CheckerId]
103
103
  get(id:ODValidId): ODChecker|null
104
104
 
105
105
  get(id:ODValidId): ODChecker|null {
106
106
  return super.get(id)
107
107
  }
108
108
 
109
- remove<CheckerId extends keyof IdList>(id:CheckerId): IdList[CheckerId]
109
+ remove<CheckerId extends keyof ODNoGeneric<IdList>>(id:CheckerId): IdList[CheckerId]
110
110
  remove(id:ODValidId): ODChecker|null
111
111
 
112
112
  remove(id:ODValidId): ODChecker|null {
113
113
  return super.remove(id)
114
114
  }
115
115
 
116
- exists(id:keyof IdList): boolean
116
+ exists(id:keyof ODNoGeneric<IdList>): boolean
117
117
  exists(id:ODValidId): boolean
118
118
 
119
119
  exists(id:ODValidId): boolean {
@@ -540,21 +540,21 @@ export class ODCheckerFunctionManager<IdList extends ODCheckerFunctionManagerIdC
540
540
  return JSON.parse(JSON.stringify(trace))
541
541
  }
542
542
 
543
- get<CheckerFunctionId extends keyof IdList>(id:CheckerFunctionId): IdList[CheckerFunctionId]
543
+ get<CheckerFunctionId extends keyof ODNoGeneric<IdList>>(id:CheckerFunctionId): IdList[CheckerFunctionId]
544
544
  get(id:ODValidId): ODCheckerFunction|null
545
545
 
546
546
  get(id:ODValidId): ODCheckerFunction|null {
547
547
  return super.get(id)
548
548
  }
549
549
 
550
- remove<CheckerFunctionId extends keyof IdList>(id:CheckerFunctionId): IdList[CheckerFunctionId]
550
+ remove<CheckerFunctionId extends keyof ODNoGeneric<IdList>>(id:CheckerFunctionId): IdList[CheckerFunctionId]
551
551
  remove(id:ODValidId): ODCheckerFunction|null
552
552
 
553
553
  remove(id:ODValidId): ODCheckerFunction|null {
554
554
  return super.remove(id)
555
555
  }
556
556
 
557
- exists(id:keyof IdList): boolean
557
+ exists(id:keyof ODNoGeneric<IdList>): boolean
558
558
  exists(id:ODValidId): boolean
559
559
 
560
560
  exists(id:ODValidId): boolean {
@@ -1,7 +1,7 @@
1
1
  ///////////////////////////////////////
2
2
  //DISCORD CLIENT MODULE
3
3
  ///////////////////////////////////////
4
- import { ODId, ODManager, ODManagerData, ODSystemError, ODValidId } from "./base"
4
+ import { ODId, ODManager, ODManagerData, ODNoGeneric, ODSystemError, ODValidId } from "./base"
5
5
  import * as discord from "discord.js"
6
6
  import {REST} from "@discordjs/rest"
7
7
  import { ODConsoleWarningMessage, ODDebugger } from "./console"
@@ -937,7 +937,7 @@ export class ODSlashCommandManager<IdList extends ODSlashCommandManagerIdConstra
937
937
  })
938
938
  }
939
939
  /**Callback on interaction from one or multiple slash commands. */
940
- onInteraction(commandName:Extract<keyof IdList,string>, callback:ODSlashCommandInteractionCallback): void
940
+ onInteraction(commandName:keyof ODNoGeneric<IdList>, callback:ODSlashCommandInteractionCallback): void
941
941
  onInteraction(commandName:string|RegExp, callback:ODSlashCommandInteractionCallback): void
942
942
  onInteraction(commandName:string|RegExp, callback:ODSlashCommandInteractionCallback){
943
943
  this.#interactionListeners.push({
@@ -952,21 +952,21 @@ export class ODSlashCommandManager<IdList extends ODSlashCommandManagerIdConstra
952
952
  }
953
953
  }
954
954
 
955
- get<SlashCommandId extends keyof IdList>(id:SlashCommandId): IdList[SlashCommandId]
955
+ get<SlashCommandId extends keyof ODNoGeneric<IdList>>(id:SlashCommandId): IdList[SlashCommandId]
956
956
  get(id:ODValidId): ODSlashCommand|null
957
957
 
958
958
  get(id:ODValidId): ODSlashCommand|null {
959
959
  return super.get(id)
960
960
  }
961
961
 
962
- remove<SlashCommandId extends keyof IdList>(id:SlashCommandId): IdList[SlashCommandId]
962
+ remove<SlashCommandId extends keyof ODNoGeneric<IdList>>(id:SlashCommandId): IdList[SlashCommandId]
963
963
  remove(id:ODValidId): ODSlashCommand|null
964
964
 
965
965
  remove(id:ODValidId): ODSlashCommand|null {
966
966
  return super.remove(id)
967
967
  }
968
968
 
969
- exists(id:keyof IdList): boolean
969
+ exists(id:keyof ODNoGeneric<IdList>): boolean
970
970
  exists(id:ODValidId): boolean
971
971
 
972
972
  exists(id:ODValidId): boolean {
@@ -1811,7 +1811,7 @@ export class ODTextCommandManager<IdList extends ODTextCommandManagerIdConstrain
1811
1811
  return {valid,reason}
1812
1812
  }
1813
1813
  /**Callback on interaction from one of the registered text commands */
1814
- onInteraction(commandPrefix:string,commandName:Extract<keyof IdList,string>, callback:ODTextCommandInteractionCallback): void
1814
+ onInteraction(commandPrefix:string,commandName:keyof ODNoGeneric<IdList>, callback:ODTextCommandInteractionCallback): void
1815
1815
  onInteraction(commandPrefix:string,commandName:string|RegExp, callback:ODTextCommandInteractionCallback): void
1816
1816
  onInteraction(commandPrefix:string,commandName:string|RegExp, callback:ODTextCommandInteractionCallback){
1817
1817
  this.#interactionListeners.push({
@@ -1831,21 +1831,21 @@ export class ODTextCommandManager<IdList extends ODTextCommandManagerIdConstrain
1831
1831
  this.#errorListeners.push(callback)
1832
1832
  }
1833
1833
 
1834
- get<TextCommandId extends keyof IdList>(id:TextCommandId): IdList[TextCommandId]
1834
+ get<TextCommandId extends keyof ODNoGeneric<IdList>>(id:TextCommandId): IdList[TextCommandId]
1835
1835
  get(id:ODValidId): ODTextCommand|null
1836
1836
 
1837
1837
  get(id:ODValidId): ODTextCommand|null {
1838
1838
  return super.get(id)
1839
1839
  }
1840
1840
 
1841
- remove<TextCommandId extends keyof IdList>(id:TextCommandId): IdList[TextCommandId]
1841
+ remove<TextCommandId extends keyof ODNoGeneric<IdList>>(id:TextCommandId): IdList[TextCommandId]
1842
1842
  remove(id:ODValidId): ODTextCommand|null
1843
1843
 
1844
1844
  remove(id:ODValidId): ODTextCommand|null {
1845
1845
  return super.remove(id)
1846
1846
  }
1847
1847
 
1848
- exists(id:keyof IdList): boolean
1848
+ exists(id:keyof ODNoGeneric<IdList>): boolean
1849
1849
  exists(id:ODValidId): boolean
1850
1850
 
1851
1851
  exists(id:ODValidId): boolean {
@@ -2190,7 +2190,7 @@ export class ODContextMenuManager<IdList extends ODContextMenuManagerIdConstrain
2190
2190
  })
2191
2191
  }
2192
2192
  /**Callback on interaction from one or multiple context menu's. */
2193
- onInteraction(menuName:Extract<keyof IdList,string>, callback:ODContextMenuInteractionCallback): void
2193
+ onInteraction(menuName:keyof ODNoGeneric<IdList>, callback:ODContextMenuInteractionCallback): void
2194
2194
  onInteraction(menuName:string|RegExp, callback:ODContextMenuInteractionCallback): void
2195
2195
 
2196
2196
  onInteraction(menuName:string|RegExp, callback:ODContextMenuInteractionCallback){
@@ -2206,21 +2206,21 @@ export class ODContextMenuManager<IdList extends ODContextMenuManagerIdConstrain
2206
2206
  }
2207
2207
  }
2208
2208
 
2209
- get<ContextMenuId extends keyof IdList>(id:ContextMenuId): IdList[ContextMenuId]
2209
+ get<ContextMenuId extends keyof ODNoGeneric<IdList>>(id:ContextMenuId): IdList[ContextMenuId]
2210
2210
  get(id:ODValidId): ODContextMenu|null
2211
2211
 
2212
2212
  get(id:ODValidId): ODContextMenu|null {
2213
2213
  return super.get(id)
2214
2214
  }
2215
2215
 
2216
- remove<ContextMenuId extends keyof IdList>(id:ContextMenuId): IdList[ContextMenuId]
2216
+ remove<ContextMenuId extends keyof ODNoGeneric<IdList>>(id:ContextMenuId): IdList[ContextMenuId]
2217
2217
  remove(id:ODValidId): ODContextMenu|null
2218
2218
 
2219
2219
  remove(id:ODValidId): ODContextMenu|null {
2220
2220
  return super.remove(id)
2221
2221
  }
2222
2222
 
2223
- exists(id:keyof IdList): boolean
2223
+ exists(id:keyof ODNoGeneric<IdList>): boolean
2224
2224
  exists(id:ODValidId): boolean
2225
2225
 
2226
2226
  exists(id:ODValidId): boolean {
@@ -1,7 +1,7 @@
1
1
  ///////////////////////////////////////
2
2
  //CODE MODULE
3
3
  ///////////////////////////////////////
4
- import { ODId, ODManager, ODManagerData, ODValidId } from "./base"
4
+ import { ODId, ODManager, ODManagerData, ODNoGeneric, ODValidId } from "./base"
5
5
  import { ODDebugger } from "./console"
6
6
 
7
7
 
@@ -12,7 +12,7 @@ import { ODDebugger } from "./console"
12
12
  * You can also specify a priority to change the execution order.
13
13
  * In Open Discord, this is used for the following processes:
14
14
  * - Autoclose/delete
15
- * - Database syncronisation (with tickets, stats & used options)
15
+ * - Database syncronisation (with tickets, statistics & used options)
16
16
  * - Panel auto-update
17
17
  * - Database Garbage Collection (removing tickets that don't exist anymore)
18
18
  * - And more!
@@ -61,21 +61,21 @@ export class ODCodeManager<IdList extends ODCodeManagerIdConstraint = ODCodeMana
61
61
  }
62
62
  }
63
63
 
64
- get<CodeId extends keyof IdList>(id:CodeId): IdList[CodeId]
64
+ get<CodeId extends keyof ODNoGeneric<IdList>>(id:CodeId): IdList[CodeId]
65
65
  get(id:ODValidId): ODCode|null
66
66
 
67
67
  get(id:ODValidId): ODCode|null {
68
68
  return super.get(id)
69
69
  }
70
70
 
71
- remove<CodeId extends keyof IdList>(id:CodeId): IdList[CodeId]
71
+ remove<CodeId extends keyof ODNoGeneric<IdList>>(id:CodeId): IdList[CodeId]
72
72
  remove(id:ODValidId): ODCode|null
73
73
 
74
74
  remove(id:ODValidId): ODCode|null {
75
75
  return super.remove(id)
76
76
  }
77
77
 
78
- exists(id:keyof IdList): boolean
78
+ exists(id:keyof ODNoGeneric<IdList>): boolean
79
79
  exists(id:ODValidId): boolean
80
80
 
81
81
  exists(id:ODValidId): boolean {
@@ -1,7 +1,7 @@
1
1
  ///////////////////////////////////////
2
2
  //CONFIG MODULE
3
3
  ///////////////////////////////////////
4
- import { ODId, ODManager, ODManagerData, ODPromiseVoid, ODSystemError, ODValidId, ODValidJsonType } from "./base"
4
+ import { ODId, ODManager, ODManagerData, ODNoGeneric, ODPromiseVoid, ODSystemError, ODValidId, ODValidJsonType } from "./base"
5
5
  import nodepath from "path"
6
6
  import { ODDebugger } from "./console"
7
7
  import fs from "fs"
@@ -43,21 +43,21 @@ export class ODConfigManager<IdList extends ODConfigManagerIdConstraint = ODConf
43
43
  }
44
44
  }
45
45
 
46
- get<ConfigId extends keyof IdList>(id:ConfigId): IdList[ConfigId]
46
+ get<ConfigId extends keyof ODNoGeneric<IdList>>(id:ConfigId): IdList[ConfigId]
47
47
  get(id:ODValidId): ODConfig<any>|null
48
48
 
49
49
  get(id:ODValidId): ODConfig<any>|null {
50
50
  return super.get(id)
51
51
  }
52
52
 
53
- remove<ConfigId extends keyof IdList>(id:ConfigId): IdList[ConfigId]
53
+ remove<ConfigId extends keyof ODNoGeneric<IdList>>(id:ConfigId): IdList[ConfigId]
54
54
  remove(id:ODValidId): ODConfig<any>|null
55
55
 
56
56
  remove(id:ODValidId): ODConfig<any>|null {
57
57
  return super.remove(id)
58
58
  }
59
59
 
60
- exists(id:keyof IdList): boolean
60
+ exists(id:keyof ODNoGeneric<IdList>): boolean
61
61
  exists(id:ODValidId): boolean
62
62
 
63
63
  exists(id:ODValidId): boolean {
@@ -1,7 +1,7 @@
1
1
  ///////////////////////////////////////
2
2
  //CONSOLE MODULE
3
3
  ///////////////////////////////////////
4
- import { ODHTTPGetRequest, ODVersion, ODSystemError, ODPluginError, ODManager, ODManagerData, ODValidId } from "./base"
4
+ import { ODHTTPGetRequest, ODVersion, ODSystemError, ODPluginError, ODManager, ODManagerData, ODValidId, ODNoGeneric } from "./base"
5
5
  import { ODMain } from "../main"
6
6
  import nodepath from "path"
7
7
  import fs from "fs"
@@ -347,7 +347,7 @@ export class ODDebugFileManager {
347
347
  fs.writeFileSync(this.path,newtext)
348
348
  }
349
349
  }
350
- /**Generate the stats/header of the debug file (containing the version) */
350
+ /**Generate the statistics/header of the debug file (containing the version) */
351
351
  #createStatsText(){
352
352
  const date = new Date()
353
353
  const dstring = `${date.getDate()}/${date.getMonth()+1}/${date.getFullYear()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`
@@ -359,7 +359,7 @@ export class ODDebugFileManager {
359
359
  "=========================\n\n"
360
360
  ].join("\n")
361
361
  }
362
- /**Write the stats/header to the debug file on startup */
362
+ /**Write the statistics/header to the debug file on startup */
363
363
  #writeStartupStats(){
364
364
  const currenttext = this.#readDebugFile()
365
365
  if (currenttext){
@@ -620,21 +620,21 @@ export class ODLiveStatusManager<IdList extends ODLiveStatusManagerIdConstraint
620
620
  this.#main = main
621
621
  }
622
622
 
623
- get<LiveStatusId extends keyof IdList>(id:LiveStatusId): IdList[LiveStatusId]
623
+ get<LiveStatusId extends keyof ODNoGeneric<IdList>>(id:LiveStatusId): IdList[LiveStatusId]
624
624
  get(id:ODValidId): ODLiveStatusSource|null
625
625
 
626
626
  get(id:ODValidId): ODLiveStatusSource|null {
627
627
  return super.get(id)
628
628
  }
629
629
 
630
- remove<LiveStatusId extends keyof IdList>(id:LiveStatusId): IdList[LiveStatusId]
630
+ remove<LiveStatusId extends keyof ODNoGeneric<IdList>>(id:LiveStatusId): IdList[LiveStatusId]
631
631
  remove(id:ODValidId): ODLiveStatusSource|null
632
632
 
633
633
  remove(id:ODValidId): ODLiveStatusSource|null {
634
634
  return super.remove(id)
635
635
  }
636
636
 
637
- exists(id:keyof IdList): boolean
637
+ exists(id:keyof ODNoGeneric<IdList>): boolean
638
638
  exists(id:ODValidId): boolean
639
639
 
640
640
  exists(id:ODValidId): boolean {
@@ -1,7 +1,7 @@
1
1
  ///////////////////////////////////////
2
2
  //COOLDOWN MODULE
3
3
  ///////////////////////////////////////
4
- import { ODId, ODValidId, ODManager, ODSystemError, ODManagerData } from "./base"
4
+ import { ODId, ODValidId, ODManager, ODSystemError, ODManagerData, ODNoGeneric } from "./base"
5
5
  import { ODDebugger } from "./console"
6
6
 
7
7
  /**## ODCooldownManagerIdConstraint `type`
@@ -27,21 +27,21 @@ export class ODCooldownManager<IdList extends ODCooldownManagerIdConstraint = OD
27
27
  }
28
28
  }
29
29
 
30
- get<CooldownId extends keyof IdList>(id:CooldownId): IdList[CooldownId]
30
+ get<CooldownId extends keyof ODNoGeneric<IdList>>(id:CooldownId): IdList[CooldownId]
31
31
  get(id:ODValidId): ODCooldown<object>|null
32
32
 
33
33
  get(id:ODValidId): ODCooldown<object>|null {
34
34
  return super.get(id)
35
35
  }
36
36
 
37
- remove<CooldownId extends keyof IdList>(id:CooldownId): IdList[CooldownId]
37
+ remove<CooldownId extends keyof ODNoGeneric<IdList>>(id:CooldownId): IdList[CooldownId]
38
38
  remove(id:ODValidId): ODCooldown<object>|null
39
39
 
40
40
  remove(id:ODValidId): ODCooldown<object>|null {
41
41
  return super.remove(id)
42
42
  }
43
43
 
44
- exists(id:keyof IdList): boolean
44
+ exists(id:keyof ODNoGeneric<IdList>): boolean
45
45
  exists(id:ODValidId): boolean
46
46
 
47
47
  exists(id:ODValidId): boolean {
@@ -1,7 +1,7 @@
1
1
  ///////////////////////////////////////
2
2
  //DATABASE MODULE
3
3
  ///////////////////////////////////////
4
- import { ODId, ODManager, ODManagerData, ODOptionalPromise, ODPromiseVoid, ODSystemError, ODValidId, ODValidJsonType } from "./base"
4
+ import { ODId, ODManager, ODManagerData, ODNoGeneric, ODOptionalPromise, ODPromiseVoid, ODSystemError, ODValidId, ODValidJsonType } from "./base"
5
5
  import fs from "fs"
6
6
  import nodepath from "path"
7
7
  import { ODDebugger } from "./console"
@@ -35,21 +35,21 @@ export class ODDatabaseManager<IdList extends ODDatabaseManagerIdConstraint = OD
35
35
  }
36
36
  }
37
37
 
38
- get<DatabaseId extends keyof IdList>(id:DatabaseId): IdList[DatabaseId]
38
+ get<DatabaseId extends keyof ODNoGeneric<IdList>>(id:DatabaseId): IdList[DatabaseId]
39
39
  get(id:ODValidId): ODDatabase<{}>|null
40
40
 
41
41
  get(id:ODValidId): ODDatabase<{}>|null {
42
42
  return super.get(id)
43
43
  }
44
44
 
45
- remove<DatabaseId extends keyof IdList>(id:DatabaseId): IdList[DatabaseId]
45
+ remove<DatabaseId extends keyof ODNoGeneric<IdList>>(id:DatabaseId): IdList[DatabaseId]
46
46
  remove(id:ODValidId): ODDatabase<{}>|null
47
47
 
48
48
  remove(id:ODValidId): ODDatabase<{}>|null {
49
49
  return super.remove(id)
50
50
  }
51
51
 
52
- exists(id:keyof IdList): boolean
52
+ exists(id:keyof ODNoGeneric<IdList>): boolean
53
53
  exists(id:ODValidId): boolean
54
54
 
55
55
  exists(id:ODValidId): boolean {
@@ -81,31 +81,31 @@ export class ODDatabase<IdList extends ODDatabaseIdConstraint = ODDatabaseIdCons
81
81
  //nothing
82
82
  }
83
83
  /**Add/Overwrite a specific category & key in the database. Returns `true` when overwritten. */
84
- set<CategoryId extends keyof IdList>(category:CategoryId, key:string, value:IdList[CategoryId]): ODOptionalPromise<boolean>
84
+ set<CategoryId extends keyof ODNoGeneric<IdList>>(category:CategoryId, key:string, value:IdList[CategoryId]): ODOptionalPromise<boolean>
85
85
  set(category:string, key:string, value:ODValidJsonType): ODOptionalPromise<boolean>
86
86
  set(category:string, key:string, value:ODValidJsonType): ODOptionalPromise<boolean> {
87
87
  return false
88
88
  }
89
89
  /**Get a specific category & key in the database */
90
- get<CategoryId extends keyof IdList>(category:CategoryId, key:string): ODOptionalPromise<IdList[CategoryId]|undefined>
90
+ get<CategoryId extends keyof ODNoGeneric<IdList>>(category:CategoryId, key:string): ODOptionalPromise<IdList[CategoryId]|undefined>
91
91
  get(category:string, key:string): ODOptionalPromise<ODValidJsonType|undefined>
92
92
  get(category:string, key:string): ODOptionalPromise<ODValidJsonType|undefined> {
93
93
  return undefined
94
94
  }
95
95
  /**Delete a specific category & key in the database */
96
- delete<CategoryId extends keyof IdList>(category:CategoryId, key:string): ODOptionalPromise<boolean>
96
+ delete<CategoryId extends keyof ODNoGeneric<IdList>>(category:CategoryId, key:string): ODOptionalPromise<boolean>
97
97
  delete(category:string, key:string): ODOptionalPromise<boolean>
98
98
  delete(category:string, key:string): ODOptionalPromise<boolean> {
99
99
  return false
100
100
  }
101
101
  /**Check if a specific category & key exists in the database */
102
- exists(category:keyof IdList, key:string): ODOptionalPromise<boolean>
102
+ exists(category:keyof ODNoGeneric<IdList>, key:string): ODOptionalPromise<boolean>
103
103
  exists(category:string, key:string): ODOptionalPromise<boolean>
104
104
  exists(category:string, key:string): ODOptionalPromise<boolean> {
105
105
  return false
106
106
  }
107
107
  /**Get a specific category in the database */
108
- getCategory<CategoryId extends keyof IdList>(category:CategoryId): ODOptionalPromise<{key:string, value:IdList[CategoryId]}[]|undefined>
108
+ getCategory<CategoryId extends keyof ODNoGeneric<IdList>>(category:CategoryId): ODOptionalPromise<{key:string, value:IdList[CategoryId]}[]|undefined>
109
109
  getCategory(category:string): ODOptionalPromise<{key:string, value:ODValidJsonType}[]|undefined>
110
110
  getCategory(category:string): ODOptionalPromise<{key:string, value:ODValidJsonType}[]|undefined> {
111
111
  return undefined
@@ -163,7 +163,7 @@ export class ODJsonDatabase<IdList extends ODDatabaseIdConstraint = ODDatabaseId
163
163
  * const data = database.getData("category","key") //data will be the value
164
164
  * //You need an ODJsonDatabase class named "database" for this example to work!
165
165
  */
166
- get<CategoryId extends keyof IdList>(category: CategoryId, key: string): ODOptionalPromise<IdList[CategoryId] | undefined>
166
+ get<CategoryId extends keyof ODNoGeneric<IdList>>(category: CategoryId, key: string): ODOptionalPromise<IdList[CategoryId] | undefined>
167
167
  get(category:string, key:string): ODOptionalPromise<ODValidJsonType|undefined>
168
168
  get(category:string, key:string): ODOptionalPromise<ODValidJsonType|undefined> {
169
169
  const currentList = this.#system.getData()
@@ -190,7 +190,7 @@ export class ODJsonDatabase<IdList extends ODDatabaseIdConstraint = ODDatabaseId
190
190
  return tempresult ? true : false
191
191
  }
192
192
  /**Get all values in `category`. Returns `undefined` when non-existent! */
193
- getCategory<CategoryId extends keyof IdList>(category:CategoryId): ODOptionalPromise<{key:string, value:IdList[CategoryId]}[]|undefined>
193
+ getCategory<CategoryId extends keyof ODNoGeneric<IdList>>(category:CategoryId): ODOptionalPromise<{key:string, value:IdList[CategoryId]}[]|undefined>
194
194
  getCategory(category:string): ODOptionalPromise<{key:string, value:ODValidJsonType}[]|undefined>
195
195
  getCategory(category:string): ODOptionalPromise<{key:string, value:ODValidJsonType}[]|undefined> {
196
196
  const currentList = this.#system.getData()
@@ -272,7 +272,7 @@ export class ODFormattedJsonDatabase<IdList extends ODDatabaseIdConstraint = ODD
272
272
  * const data = database.getData("category","key") //data will be the value
273
273
  * //You need an ODFormattedJsonDatabase class named "database" for this example to work!
274
274
  */
275
- get<CategoryId extends keyof IdList>(category: CategoryId, key: string): ODOptionalPromise<IdList[CategoryId] | undefined>
275
+ get<CategoryId extends keyof ODNoGeneric<IdList>>(category: CategoryId, key: string): ODOptionalPromise<IdList[CategoryId] | undefined>
276
276
  get(category:string, key:string): ODOptionalPromise<ODValidJsonType|undefined>
277
277
  get(category:string, key:string): ODOptionalPromise<ODValidJsonType|undefined> {
278
278
  const currentList = this.#system.getData()
@@ -299,7 +299,7 @@ export class ODFormattedJsonDatabase<IdList extends ODDatabaseIdConstraint = ODD
299
299
  return tempresult ? true : false
300
300
  }
301
301
  /**Get all values in `category`. Returns `undefined` when non-existent! */
302
- getCategory<CategoryId extends keyof IdList>(category:CategoryId): ODOptionalPromise<{key:string, value:IdList[CategoryId]}[]|undefined>
302
+ getCategory<CategoryId extends keyof ODNoGeneric<IdList>>(category:CategoryId): ODOptionalPromise<{key:string, value:IdList[CategoryId]}[]|undefined>
303
303
  getCategory(category:string): ODOptionalPromise<{key:string, value:ODValidJsonType}[]|undefined>
304
304
  getCategory(category:string): ODOptionalPromise<{key:string, value:ODValidJsonType}[]|undefined> {
305
305
  const currentList = this.#system.getData()