@open-discord-bots/framework 0.2.9 → 0.2.11
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/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", "v0.2.
|
|
48
|
+
this.versions.add(base_1.ODVersion.fromString("opendiscord:api", "v0.2.11"));
|
|
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;
|
|
@@ -10,8 +10,8 @@ import { ODDebugger } from "./console";
|
|
|
10
10
|
*/
|
|
11
11
|
export declare class ODActionImplementation<Source extends string, Params extends object, Result extends object, WorkerIds extends string = string> extends ODManagerData {
|
|
12
12
|
/**The manager that has all workers of this implementation */
|
|
13
|
-
workers: ODWorkerManager<
|
|
14
|
-
constructor(id: ODValidId, callback?: ODWorkerCallback<
|
|
13
|
+
workers: ODWorkerManager<Partial<Result>, Source, Params, WorkerIds>;
|
|
14
|
+
constructor(id: ODValidId, callback?: ODWorkerCallback<Result, Source, Params>, priority?: number, callbackId?: ODValidId);
|
|
15
15
|
/**Execute all workers & return the result. */
|
|
16
16
|
run(source: Source, params: Params): Promise<Partial<Result>>;
|
|
17
17
|
}
|
|
@@ -81,7 +81,7 @@ function checkFrameworkAllowed(project) {
|
|
|
81
81
|
if (!fs_1.default.existsSync(path))
|
|
82
82
|
throw new Error(logTitle + ": Project uses invalid structure for Open Discord! (missing: " + path + ")");
|
|
83
83
|
}
|
|
84
|
-
const licenseContents = fs_1.default.readFileSync("./
|
|
84
|
+
const licenseContents = fs_1.default.readFileSync("./LICENSE.md").toString();
|
|
85
85
|
const readmeContents = fs_1.default.readFileSync("./README.md").toString();
|
|
86
86
|
if (!licenseContents.includes("DJj123dj & Contributors") ||
|
|
87
87
|
!licenseContents.includes("GNU GENERAL PUBLIC LICENSE") ||
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-discord-bots/framework",
|
|
3
3
|
"author": "DJj123dj",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.11",
|
|
5
5
|
"description": "The core framework of the popular open-source discord bots: Open Ticket & Open Moderation.",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
package/src/api/main.ts
CHANGED
|
@@ -142,7 +142,7 @@ export class ODMain implements ODMainManagers {
|
|
|
142
142
|
constructor(managers:ODMainManagers,project:ODProjectType){
|
|
143
143
|
this.project = project
|
|
144
144
|
this.versions = managers.versions
|
|
145
|
-
this.versions.add(ODVersion.fromString("opendiscord:api","v0.2.
|
|
145
|
+
this.versions.add(ODVersion.fromString("opendiscord:api","v0.2.11"))
|
|
146
146
|
this.versions.add(ODVersion.fromString("opendiscord:livestatus","v2.0.0"))
|
|
147
147
|
|
|
148
148
|
this.debugfile = managers.debugfile
|
|
@@ -14,9 +14,9 @@ import { ODDebugger } from "./console"
|
|
|
14
14
|
*/
|
|
15
15
|
export class ODActionImplementation<Source extends string,Params extends object,Result extends object,WorkerIds extends string = string> extends ODManagerData {
|
|
16
16
|
/**The manager that has all workers of this implementation */
|
|
17
|
-
workers: ODWorkerManager<
|
|
17
|
+
workers: ODWorkerManager<Partial<Result>,Source,Params,WorkerIds>
|
|
18
18
|
|
|
19
|
-
constructor(id:ODValidId, callback?:ODWorkerCallback<
|
|
19
|
+
constructor(id:ODValidId, callback?:ODWorkerCallback<Result,Source,Params>, priority?:number, callbackId?:ODValidId){
|
|
20
20
|
super(id)
|
|
21
21
|
this.workers = new ODWorkerManager("descending")
|
|
22
22
|
if (callback) this.workers.add(new ODWorker(callbackId ? callbackId : id,priority ?? 0,callback))
|
|
@@ -78,7 +78,7 @@ export function checkFrameworkAllowed(project?:ODProjectType){
|
|
|
78
78
|
if (!fs.existsSync(path)) throw new Error(logTitle+": Project uses invalid structure for Open Discord! (missing: "+path+")")
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
const licenseContents = fs.readFileSync("./
|
|
81
|
+
const licenseContents = fs.readFileSync("./LICENSE.md").toString()
|
|
82
82
|
const readmeContents = fs.readFileSync("./README.md").toString()
|
|
83
83
|
|
|
84
84
|
if (
|