@open-discord-bots/framework 0.3.18 → 0.4.0
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
|
@@ -44,7 +44,7 @@ export class ODMain {
|
|
|
44
44
|
constructor(managers, project) {
|
|
45
45
|
this.project = project;
|
|
46
46
|
this.versions = managers.versions;
|
|
47
|
-
this.versions.add(ODVersion.fromString("opendiscord:api", "v0.
|
|
47
|
+
this.versions.add(ODVersion.fromString("opendiscord:api", "v0.4.0"));
|
|
48
48
|
this.versions.add(ODVersion.fromString("opendiscord:livestatus", "v2.0.0"));
|
|
49
49
|
this.debugfile = managers.debugfile;
|
|
50
50
|
this.console = managers.console;
|
|
@@ -164,7 +164,7 @@ export class ODJsonConfig extends ODConfig {
|
|
|
164
164
|
if (!this.initiated)
|
|
165
165
|
throw new ODSystemError("Unable to save config \"" + nodepath.join("./", this.path) + "\", the file hasn't been initiated yet!");
|
|
166
166
|
try {
|
|
167
|
-
const contents = this.formatter.stringify(this.data);
|
|
167
|
+
const contents = this.formatter.stringify(this.data, this.path);
|
|
168
168
|
fs.writeFileSync(this.path, contents);
|
|
169
169
|
super.save();
|
|
170
170
|
}
|
|
@@ -233,7 +233,7 @@ export class ODJsonCommentsConfig extends ODConfig {
|
|
|
233
233
|
if (!this.initiated)
|
|
234
234
|
throw new ODSystemError("Unable to save JSONC config \"" + nodepath.join("./", this.path) + "\", the file hasn't been initiated yet!");
|
|
235
235
|
try {
|
|
236
|
-
const contents = this.formatter.stringify(this.data);
|
|
236
|
+
const contents = this.formatter.stringify(this.data, this.path);
|
|
237
237
|
fs.writeFileSync(this.path, contents);
|
|
238
238
|
super.save();
|
|
239
239
|
}
|
|
@@ -224,7 +224,7 @@ export class ODFormattedJsonDatabase extends ODDatabase {
|
|
|
224
224
|
},
|
|
225
225
|
/**Write parsed data to the json file */
|
|
226
226
|
setData: (data) => {
|
|
227
|
-
fs.writeFileSync(this.path, this.formatter.stringify(data));
|
|
227
|
+
fs.writeFileSync(this.path, this.formatter.stringify(data, this.path));
|
|
228
228
|
}
|
|
229
229
|
};
|
|
230
230
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-discord-bots/framework",
|
|
3
3
|
"author": "DJj123dj",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.0",
|
|
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",
|