@open-discord-bots/framework 0.2.7 → 0.2.9
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 +1 -1
- package/dist/startup/compilation.js +6 -5
- package/package.json +3 -2
- package/src/api/main.ts +1 -1
- package/src/startup/compilation.ts +10 -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", "v0.2.
|
|
48
|
+
this.versions.add(base_1.ODVersion.fromString("opendiscord:api", "v0.2.9"));
|
|
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;
|
|
@@ -76,17 +76,18 @@ function checkFrameworkAllowed(project) {
|
|
|
76
76
|
"./languages/",
|
|
77
77
|
"./config/",
|
|
78
78
|
"./plugins/",
|
|
79
|
-
"./.github/",
|
|
80
|
-
"./.github/FUNDING.yml",
|
|
81
|
-
"./.github/SECURITY.md"
|
|
82
79
|
];
|
|
83
80
|
for (const path of requiredStructures) {
|
|
84
81
|
if (!fs_1.default.existsSync(path))
|
|
85
82
|
throw new Error(logTitle + ": Project uses invalid structure for Open Discord! (missing: " + path + ")");
|
|
86
83
|
}
|
|
87
|
-
|
|
88
|
-
throw new Error(logTitle + ": Please do not use this framework in third party bots outside Open Ticket/Moderation! (1)");
|
|
84
|
+
const licenseContents = fs_1.default.readFileSync("./LICENCE.md").toString();
|
|
89
85
|
const readmeContents = fs_1.default.readFileSync("./README.md").toString();
|
|
86
|
+
if (!licenseContents.includes("DJj123dj & Contributors") ||
|
|
87
|
+
!licenseContents.includes("GNU GENERAL PUBLIC LICENSE") ||
|
|
88
|
+
!licenseContents.includes("DJdj Development. <https://www.dj-dj.be/>") ||
|
|
89
|
+
!licenseContents.includes("Additional Terms"))
|
|
90
|
+
throw new Error(logTitle + ": Please do not use this framework in third party bots or outside Open Ticket/Moderation! (1)");
|
|
90
91
|
if (!readmeContents.includes(`<img src="https://apis.dj-dj.be/cdn/openticket/logo.png" alt="Open Ticket" width="650px">`) &&
|
|
91
92
|
!readmeContents.includes(`<img src="https://apis.dj-dj.be/cdn/openmoderation/logo.png" alt="Open Moderation" width="650px">`))
|
|
92
93
|
throw new Error(logTitle + ": Please do not use this framework in third party bots or outside Open Ticket/Moderation! (2)");
|
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.9",
|
|
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",
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"exports": {
|
|
30
30
|
".": "./dist/index.js",
|
|
31
31
|
"./api": "./dist/api/index.js",
|
|
32
|
-
"./utilities": "./dist/utilities/index.js"
|
|
32
|
+
"./utilities": "./dist/utilities/index.js",
|
|
33
|
+
"./cli": "./dist/cli/index.js"
|
|
33
34
|
}
|
|
34
35
|
}
|
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.9"))
|
|
146
146
|
this.versions.add(ODVersion.fromString("opendiscord:livestatus","v2.0.0"))
|
|
147
147
|
|
|
148
148
|
this.debugfile = managers.debugfile
|
|
@@ -73,15 +73,21 @@ export function checkFrameworkAllowed(project?:ODProjectType){
|
|
|
73
73
|
"./languages/",
|
|
74
74
|
"./config/",
|
|
75
75
|
"./plugins/",
|
|
76
|
-
"./.github/",
|
|
77
|
-
"./.github/FUNDING.yml",
|
|
78
|
-
"./.github/SECURITY.md"
|
|
79
76
|
]
|
|
80
77
|
for (const path of requiredStructures){
|
|
81
78
|
if (!fs.existsSync(path)) throw new Error(logTitle+": Project uses invalid structure for Open Discord! (missing: "+path+")")
|
|
82
79
|
}
|
|
83
|
-
|
|
80
|
+
|
|
81
|
+
const licenseContents = fs.readFileSync("./LICENCE.md").toString()
|
|
84
82
|
const readmeContents = fs.readFileSync("./README.md").toString()
|
|
83
|
+
|
|
84
|
+
if (
|
|
85
|
+
!licenseContents.includes("DJj123dj & Contributors") ||
|
|
86
|
+
!licenseContents.includes("GNU GENERAL PUBLIC LICENSE") ||
|
|
87
|
+
!licenseContents.includes("DJdj Development. <https://www.dj-dj.be/>") ||
|
|
88
|
+
!licenseContents.includes("Additional Terms")
|
|
89
|
+
) throw new Error(logTitle+": Please do not use this framework in third party bots or outside Open Ticket/Moderation! (1)")
|
|
90
|
+
|
|
85
91
|
if (
|
|
86
92
|
!readmeContents.includes(`<img src="https://apis.dj-dj.be/cdn/openticket/logo.png" alt="Open Ticket" width="650px">`) &&
|
|
87
93
|
!readmeContents.includes(`<img src="https://apis.dj-dj.be/cdn/openmoderation/logo.png" alt="Open Moderation" width="650px">`)
|