@open-discord-bots/framework 0.2.12 → 0.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/index.d.ts +26 -26
- package/dist/api/index.js +26 -42
- package/dist/api/main.d.ts +24 -24
- package/dist/api/main.js +7 -11
- package/dist/api/modules/action.d.ts +3 -3
- package/dist/api/modules/action.js +8 -14
- package/dist/api/modules/base.d.ts +2 -2
- package/dist/api/modules/base.js +14 -63
- package/dist/api/modules/builder.d.ts +3 -3
- package/dist/api/modules/builder.js +61 -122
- package/dist/api/modules/checker.d.ts +4 -4
- package/dist/api/modules/checker.js +55 -87
- package/dist/api/modules/client.d.ts +4 -4
- package/dist/api/modules/client.js +71 -118
- package/dist/api/modules/code.d.ts +2 -2
- package/dist/api/modules/code.js +3 -8
- package/dist/api/modules/config.d.ts +2 -2
- package/dist/api/modules/config.js +21 -63
- package/dist/api/modules/console.d.ts +2 -2
- package/dist/api/modules/console.js +45 -67
- package/dist/api/modules/cooldown.d.ts +2 -2
- package/dist/api/modules/cooldown.js +13 -23
- package/dist/api/modules/database.d.ts +2 -2
- package/dist/api/modules/database.js +19 -29
- package/dist/api/modules/event.d.ts +2 -2
- package/dist/api/modules/event.js +6 -11
- package/dist/api/modules/flag.d.ts +2 -2
- package/dist/api/modules/flag.js +3 -8
- package/dist/api/modules/fuse.js +2 -7
- package/dist/api/modules/helpmenu.d.ts +2 -2
- package/dist/api/modules/helpmenu.js +8 -16
- package/dist/api/modules/language.d.ts +2 -2
- package/dist/api/modules/language.js +12 -21
- package/dist/api/modules/permission.d.ts +3 -3
- package/dist/api/modules/permission.js +9 -47
- package/dist/api/modules/plugin.d.ts +2 -2
- package/dist/api/modules/plugin.js +9 -18
- package/dist/api/modules/post.d.ts +3 -3
- package/dist/api/modules/post.js +3 -8
- package/dist/api/modules/progressbar.d.ts +2 -2
- package/dist/api/modules/progressbar.js +13 -26
- package/dist/api/modules/responder.d.ts +5 -5
- package/dist/api/modules/responder.js +66 -125
- package/dist/api/modules/session.d.ts +2 -2
- package/dist/api/modules/session.js +4 -42
- package/dist/api/modules/startscreen.d.ts +4 -4
- package/dist/api/modules/startscreen.js +28 -44
- package/dist/api/modules/statistic.d.ts +3 -3
- package/dist/api/modules/statistic.js +11 -20
- package/dist/api/modules/verifybar.d.ts +5 -5
- package/dist/api/modules/verifybar.js +6 -11
- package/dist/api/modules/worker.d.ts +1 -1
- package/dist/api/modules/worker.js +6 -11
- package/dist/cli/editConfig.d.ts +2 -2
- package/dist/cli/editConfig.js +189 -229
- package/dist/cli/index.d.ts +2 -2
- package/dist/cli/index.js +37 -62
- package/dist/index.d.ts +4 -4
- package/dist/index.js +6 -13
- package/dist/startup/compilation.d.ts +1 -1
- package/dist/startup/compilation.js +35 -42
- package/dist/startup/dump.d.ts +1 -1
- package/dist/startup/dump.js +4 -41
- package/dist/startup/errorHandling.d.ts +1 -1
- package/dist/startup/errorHandling.js +2 -38
- package/dist/startup/pluginLauncher.d.ts +1 -1
- package/dist/startup/pluginLauncher.js +9 -49
- package/dist/utilities/index.d.ts +1 -1
- package/dist/utilities/index.js +20 -71
- package/package.json +2 -1
- package/src/api/index.ts +26 -26
- package/src/api/main.ts +25 -25
- package/src/api/modules/action.ts +3 -3
- package/src/api/modules/base.ts +2 -2
- package/src/api/modules/builder.ts +3 -3
- package/src/api/modules/checker.ts +4 -4
- package/src/api/modules/client.ts +4 -4
- package/src/api/modules/code.ts +2 -2
- package/src/api/modules/component.txt +2 -2
- package/src/api/modules/config.ts +2 -2
- package/src/api/modules/console.ts +2 -2
- package/src/api/modules/cooldown.ts +2 -2
- package/src/api/modules/database.ts +2 -2
- package/src/api/modules/event.ts +2 -2
- package/src/api/modules/flag.ts +2 -2
- package/src/api/modules/helpmenu.ts +2 -2
- package/src/api/modules/language.ts +2 -2
- package/src/api/modules/permission.ts +3 -3
- package/src/api/modules/plugin.ts +3 -3
- package/src/api/modules/post.ts +3 -3
- package/src/api/modules/progressbar.ts +2 -2
- package/src/api/modules/responder.ts +5 -5
- package/src/api/modules/session.ts +2 -2
- package/src/api/modules/startscreen.ts +4 -4
- package/src/api/modules/statistic.ts +3 -3
- package/src/api/modules/verifybar.ts +5 -5
- package/src/api/modules/worker.ts +1 -1
- package/src/cli/editConfig.ts +3 -3
- package/src/cli/index.ts +3 -3
- package/src/index.ts +5 -5
- package/src/startup/compilation.ts +1 -1
- package/src/startup/dump.ts +2 -2
- package/src/startup/errorHandling.ts +2 -2
- package/src/startup/pluginLauncher.ts +2 -2
- package/src/utilities/index.ts +1 -1
- package/tools/cleanup.js +1 -1
- package/tsconfig.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
///////////////////////////////////////
|
|
2
2
|
//STARTSCREEN MODULE
|
|
3
3
|
///////////////////////////////////////
|
|
4
|
-
import { ODId, ODManager, ODManagerData, ODNoGeneric, ODValidId } from "./base"
|
|
5
|
-
import { ODDebugger, ODError, ODLiveStatusManager, ODLiveStatusManagerIdConstraint } from "./console"
|
|
6
|
-
import { ODFlag } from "./flag"
|
|
7
|
-
import { ODPlugin, ODUnknownCrashedPlugin } from "./plugin"
|
|
4
|
+
import { ODId, ODManager, ODManagerData, ODNoGeneric, ODValidId } from "./base.js"
|
|
5
|
+
import { ODDebugger, ODError, ODLiveStatusManager, ODLiveStatusManagerIdConstraint } from "./console.js"
|
|
6
|
+
import { ODFlag } from "./flag.js"
|
|
7
|
+
import { ODPlugin, ODUnknownCrashedPlugin } from "./plugin.js"
|
|
8
8
|
import ansis from "ansis"
|
|
9
9
|
|
|
10
10
|
/**## ODStartScreenComponentRenderCallback `type`
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
///////////////////////////////////////
|
|
2
2
|
//STATISTIC MODULE
|
|
3
3
|
///////////////////////////////////////
|
|
4
|
-
import { ODId, ODManager, ODManagerData, ODNoGeneric, ODSystemError, ODValidId } from "./base"
|
|
5
|
-
import { ODDebugger } from "./console"
|
|
6
|
-
import { ODDatabase, ODDatabaseIdConstraint, ODJsonDatabaseStructure } from "./database"
|
|
4
|
+
import { ODId, ODManager, ODManagerData, ODNoGeneric, ODSystemError, ODValidId } from "./base.js"
|
|
5
|
+
import { ODDebugger } from "./console.js"
|
|
6
|
+
import { ODDatabase, ODDatabaseIdConstraint, ODJsonDatabaseStructure } from "./database.js"
|
|
7
7
|
import * as discord from "discord.js"
|
|
8
8
|
|
|
9
9
|
/**## ODValidStatisticValue `type`
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
///////////////////////////////////////
|
|
2
2
|
//VERIFYBAR MODULE
|
|
3
3
|
///////////////////////////////////////
|
|
4
|
-
import { ODId, ODManager, ODManagerData, ODNoGeneric, ODValidId } from "./base"
|
|
5
|
-
import { ODMessage } from "./builder"
|
|
6
|
-
import { ODDebugger } from "./console"
|
|
7
|
-
import { ODButtonResponderInstance } from "./responder"
|
|
4
|
+
import { ODId, ODManager, ODManagerData, ODNoGeneric, ODValidId } from "./base.js"
|
|
5
|
+
import { ODMessage } from "./builder.js"
|
|
6
|
+
import { ODDebugger } from "./console.js"
|
|
7
|
+
import { ODButtonResponderInstance } from "./responder.js"
|
|
8
8
|
import * as discord from "discord.js"
|
|
9
|
-
import { ODWorkerManager } from "./worker"
|
|
9
|
+
import { ODWorkerManager } from "./worker.js"
|
|
10
10
|
|
|
11
11
|
/**## ODVerifyBar `class`
|
|
12
12
|
* This is an Open Discord verifybar.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
///////////////////////////////////////
|
|
2
2
|
//WORKER MODULE
|
|
3
3
|
///////////////////////////////////////
|
|
4
|
-
import { ODId, ODManager, ODManagerData, ODSystemError, ODValidId } from "./base"
|
|
4
|
+
import { ODId, ODManager, ODManagerData, ODSystemError, ODValidId } from "./base.js"
|
|
5
5
|
|
|
6
6
|
/**## ODWorkerCallback `type`
|
|
7
7
|
* This is the callback used in `ODWorker`!
|
package/src/cli/editConfig.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as api from "../api/index"
|
|
2
|
-
import * as utilities from "../utilities/index"
|
|
1
|
+
import * as api from "../api/index.js"
|
|
2
|
+
import * as utilities from "../utilities/index.js"
|
|
3
3
|
import {Terminal, terminal} from "terminal-kit"
|
|
4
4
|
import ansis from "ansis"
|
|
5
|
-
import {ODCliHeaderOpts, renderHeader} from "."
|
|
5
|
+
import {ODCliHeaderOpts, renderHeader} from "./index.js"
|
|
6
6
|
|
|
7
7
|
export class ODCliEditConfigInstance {
|
|
8
8
|
private readonly opts: ODCliHeaderOpts
|
package/src/cli/index.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as api from "../api/index"
|
|
2
|
-
import * as utilities from "../utilities/index"
|
|
1
|
+
import * as api from "../api/index.js"
|
|
2
|
+
import * as utilities from "../utilities/index.js"
|
|
3
3
|
import {Terminal, terminal} from "terminal-kit"
|
|
4
4
|
import * as discord from "discord.js"
|
|
5
5
|
import ansis from "ansis"
|
|
6
6
|
import crypto from "crypto"
|
|
7
7
|
|
|
8
|
-
export * from "./editConfig"
|
|
8
|
+
export * from "./editConfig.js"
|
|
9
9
|
|
|
10
10
|
/**## ODCliHeaderOpts `interface`
|
|
11
11
|
* All metadata required for rendering the Interactive Setup CLI header.
|
package/src/index.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { loadDumpCommand } from "./startup/dump"
|
|
2
|
-
export { loadAllPlugins } from "./startup/pluginLauncher"
|
|
3
|
-
export { frameworkStartup } from "./startup/compilation"
|
|
4
|
-
export { loadErrorHandling } from "./startup/errorHandling"
|
|
5
|
-
import { checkFrameworkAllowed } from "./startup/compilation"
|
|
1
|
+
export { loadDumpCommand } from "./startup/dump.js"
|
|
2
|
+
export { loadAllPlugins } from "./startup/pluginLauncher.js"
|
|
3
|
+
export { frameworkStartup } from "./startup/compilation.js"
|
|
4
|
+
export { loadErrorHandling } from "./startup/errorHandling.js"
|
|
5
|
+
import { checkFrameworkAllowed } from "./startup/compilation.js"
|
|
6
6
|
|
|
7
7
|
//check directory structure
|
|
8
8
|
checkFrameworkAllowed()
|
|
@@ -3,7 +3,7 @@ import ts from "typescript"
|
|
|
3
3
|
import { createHash, Hash } from "crypto"
|
|
4
4
|
import nodepath from "path"
|
|
5
5
|
import ansis from "ansis"
|
|
6
|
-
import type { ODPluginData, ODProjectType } from "../api"
|
|
6
|
+
import type { ODPluginData, ODProjectType } from "../api/index.js"
|
|
7
7
|
|
|
8
8
|
/** ## What is this?
|
|
9
9
|
* This is a function which compares `./src/` with a hash stored in `./dist/hash.txt`.
|
package/src/startup/dump.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as api from "../api/index"
|
|
2
|
-
import * as utilities from "../utilities/index"
|
|
1
|
+
import * as api from "../api/index.js"
|
|
2
|
+
import * as utilities from "../utilities/index.js"
|
|
3
3
|
|
|
4
4
|
export function loadErrorHandling(opendiscord:api.ODMain,project:api.ODProjectType){
|
|
5
5
|
process.on("uncaughtException",async (error,origin) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as api from "../api/index"
|
|
2
|
-
import * as utilities from "../utilities/index"
|
|
1
|
+
import * as api from "../api/index.js"
|
|
2
|
+
import * as utilities from "../utilities/index.js"
|
|
3
3
|
import fs from "fs"
|
|
4
4
|
|
|
5
5
|
export const loadAllPlugins = async (opendiscord:api.ODMain) => {
|
package/src/utilities/index.ts
CHANGED
package/tools/cleanup.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import fs from "fs"
|
|
2
2
|
fs.rmSync("./dist",{recursive: true, force:true})
|