From 78220e1e368436723f2f24ce1e23811cbcbe0414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Demirci?= Date: Mon, 6 Jul 2020 08:49:18 +0000 Subject: [PATCH 1/5] Working on importing/exporting custom config files --- classes/ReactionRole.js | 1 + config.example.json | 29 +++++++++++ methods/importConfig.js | 3 ++ package-lock.json | 107 ++++++++++++++++++++++++++++++++++++++++ test.js | 15 +++--- 5 files changed, 149 insertions(+), 6 deletions(-) create mode 100644 config.example.json create mode 100644 methods/importConfig.js create mode 100644 package-lock.json diff --git a/classes/ReactionRole.js b/classes/ReactionRole.js index 3f6adaa..f586b7d 100644 --- a/classes/ReactionRole.js +++ b/classes/ReactionRole.js @@ -12,4 +12,5 @@ module.exports = function ReactionRole(token) { self.createMessage = (...arguments) => require("../methods/createMessage")(self, ...arguments); self.init = async () => await require("../methods/init")(self); self.reInit = async () => await require("../methods/reInit")(self); + self.importConfig = (config) => require("../methods/importConfig")(self, config); }; \ No newline at end of file diff --git a/config.example.json b/config.example.json new file mode 100644 index 0000000..5af4953 --- /dev/null +++ b/config.example.json @@ -0,0 +1,29 @@ +[ + { + "messageID": "MESSAGE_ID", + "channelID": "CHANNEL_ID", + "limit": 2, + "restrictions": null, + "reactions": [ + { + "emoji": "EMOJI", + "roles": [ + "ROLE_ID", + "ROLE_ID" + ] + }, + { + "emoji": "EMOJI", + "roles": [ + "ROLE_ID" + ] + }, + { + "emoji": "EMOJI", + "roles": [ + "ROLE_ID" + ] + } + ] + } +] \ No newline at end of file diff --git a/methods/importConfig.js b/methods/importConfig.js new file mode 100644 index 0000000..9627d9a --- /dev/null +++ b/methods/importConfig.js @@ -0,0 +1,3 @@ +module.exports = (self, config) => { + self.config = self.config.concat(config) +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..7da738d --- /dev/null +++ b/package-lock.json @@ -0,0 +1,107 @@ +{ + "name": "reaction-role", + "version": "2.0.1", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@discordjs/collection": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.1.5.tgz", + "integrity": "sha512-CU1q0UXQUpFNzNB7gufgoisDHP7n+T3tkqTsp3MNUkVJ5+hS3BCvME8uCXAUFlz+6T2FbTCu75A+yQ7HMKqRKw==" + }, + "@discordjs/form-data": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@discordjs/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-ZfFsbgEXW71Rw/6EtBdrP5VxBJy4dthyC0tpQKGKmYFImlmmrykO14Za+BiIVduwjte0jXEBlhSKf0MWbFp9Eg==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "requires": { + "event-target-shim": "^5.0.0" + } + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "discord.js": { + "version": "12.2.0", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-12.2.0.tgz", + "integrity": "sha512-Ueb/0SOsxXyqwvwFYFe0msMrGqH1OMqpp2Dpbplnlr4MzcRrFWwsBM9gKNZXPVBHWUKiQkwU8AihXBXIvTTSvg==", + "requires": { + "@discordjs/collection": "^0.1.5", + "@discordjs/form-data": "^3.0.1", + "abort-controller": "^3.0.0", + "node-fetch": "^2.6.0", + "prism-media": "^1.2.0", + "setimmediate": "^1.0.5", + "tweetnacl": "^1.0.3", + "ws": "^7.2.1" + } + }, + "event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==" + }, + "mime-db": { + "version": "1.44.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" + }, + "mime-types": { + "version": "2.1.27", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", + "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", + "requires": { + "mime-db": "1.44.0" + } + }, + "node-fetch": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", + "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==" + }, + "prism-media": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/prism-media/-/prism-media-1.2.2.tgz", + "integrity": "sha512-I+nkWY212lJ500jLe4tN9tWO7nRiBAVdMv76P9kffZjYhw20raMlW1HSSvS+MLXC9MmbNZCazMrAr+5jEEgTuw==" + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + }, + "tweetnacl": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", + "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==" + }, + "ws": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.3.1.tgz", + "integrity": "sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA==" + } + } +} diff --git a/test.js b/test.js index d16acf4..cd022cc 100644 --- a/test.js +++ b/test.js @@ -1,10 +1,13 @@ const ReactionRole = require("."); -const reactionRole = new ReactionRole("TOKEN"); +const system = new ReactionRole("NTkwNzk4MTcyNjcwOTE4NjY5.XwLiWA.k_lAbp7pB3tU98uVunWEAvNlJLA"); -let option1 = reactionRole.createOption("✅", "697809380137107478"); -let option2 = reactionRole.createOption("rifcat:720623460321198152", "708355720436777033"); -let option3 = reactionRole.createOption("cat1:720623437466435626", "703908514887761930"); +/*let option1 = system.createOption("✅", "697809380137107478"); +let option2 = system.createOption("rifcat:720623460321198152", "708355720436777033"); +let option3 = system.createOption("cat1:720623437466435626", "703908514887761930"); -reactionRole.createMessage("727272497157898372", "702115562158948432", 2, null, option1, option2, option3); +system.createMessage("727272497157898372", "702115562158948432", 2, null, option1, option2, option3);*/ +system.importConfig(require("./config.json")); -reactionRole.init(); \ No newline at end of file +console.log(system.config) + +system.init(); \ No newline at end of file From 6d92ef77f318be9495fd90b7f30651a59a1c7673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Demirci?= Date: Mon, 6 Jul 2020 08:50:32 +0000 Subject: [PATCH 2/5] token lol --- test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.js b/test.js index cd022cc..5384d62 100644 --- a/test.js +++ b/test.js @@ -1,5 +1,5 @@ const ReactionRole = require("."); -const system = new ReactionRole("NTkwNzk4MTcyNjcwOTE4NjY5.XwLiWA.k_lAbp7pB3tU98uVunWEAvNlJLA"); +const system = new ReactionRole("TOKEN"); /*let option1 = system.createOption("✅", "697809380137107478"); let option2 = system.createOption("rifcat:720623460321198152", "708355720436777033"); From 80bd78ed089b3ff8225dc495a7e646087021bd26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Demirci?= Date: Mon, 6 Jul 2020 09:15:00 +0000 Subject: [PATCH 3/5] export config --- classes/ReactionRole.js | 1 + methods/exportConfig.js | 11 +++++++++++ test.js | 4 +++- 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 methods/exportConfig.js diff --git a/classes/ReactionRole.js b/classes/ReactionRole.js index f586b7d..698f2f7 100644 --- a/classes/ReactionRole.js +++ b/classes/ReactionRole.js @@ -13,4 +13,5 @@ module.exports = function ReactionRole(token) { self.init = async () => await require("../methods/init")(self); self.reInit = async () => await require("../methods/reInit")(self); self.importConfig = (config) => require("../methods/importConfig")(self, config); + self.exportConfig = (file) => require("../methods/exportConfig")(self, file); }; \ No newline at end of file diff --git a/methods/exportConfig.js b/methods/exportConfig.js new file mode 100644 index 0000000..7cb5dba --- /dev/null +++ b/methods/exportConfig.js @@ -0,0 +1,11 @@ +const fs = require("fs"); +const SuperError = require("../classes/SuperError"); +const checkFile = require("./checkFile"); + +module.exports = (self, file) => { + try { + fs.writeFileSync(file, JSON.stringify(self.config, null, 4)); + } catch (err) { + throw new SuperError("CanNotWriteFile", err.toString()); + }; +}; \ No newline at end of file diff --git a/test.js b/test.js index 5384d62..aea2ca9 100644 --- a/test.js +++ b/test.js @@ -1,5 +1,5 @@ const ReactionRole = require("."); -const system = new ReactionRole("TOKEN"); +const system = new ReactionRole("NTkwNzk4MTcyNjcwOTE4NjY5.XwLlsw.mM57XPYCSMtURxLmvmouqD_Ajy8"); /*let option1 = system.createOption("✅", "697809380137107478"); let option2 = system.createOption("rifcat:720623460321198152", "708355720436777033"); @@ -10,4 +10,6 @@ system.importConfig(require("./config.json")); console.log(system.config) +system.exportConfig("test/deneme") + system.init(); \ No newline at end of file From 1f105a3f2651abff97c98072f6d1aa7ca7b2f13a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Demirci?= Date: Mon, 6 Jul 2020 09:15:44 +0000 Subject: [PATCH 4/5] fix --- methods/exportConfig.js | 1 - test.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/methods/exportConfig.js b/methods/exportConfig.js index 7cb5dba..c36fb2d 100644 --- a/methods/exportConfig.js +++ b/methods/exportConfig.js @@ -1,6 +1,5 @@ const fs = require("fs"); const SuperError = require("../classes/SuperError"); -const checkFile = require("./checkFile"); module.exports = (self, file) => { try { diff --git a/test.js b/test.js index aea2ca9..0512ece 100644 --- a/test.js +++ b/test.js @@ -1,5 +1,5 @@ const ReactionRole = require("."); -const system = new ReactionRole("NTkwNzk4MTcyNjcwOTE4NjY5.XwLlsw.mM57XPYCSMtURxLmvmouqD_Ajy8"); +const system = new ReactionRole("TOKEN"); /*let option1 = system.createOption("✅", "697809380137107478"); let option2 = system.createOption("rifcat:720623460321198152", "708355720436777033"); From 8d7442ba11121294b2c084c1c6ff9dad15b421b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Demirci?= Date: Mon, 6 Jul 2020 09:42:04 +0000 Subject: [PATCH 5/5] Added FileManager for better interaction --- classes/FileManager.js | 30 +++++++++++ classes/ReactionRole.js | 2 + methods/exportConfig.js | 10 +--- package-lock.json | 107 ---------------------------------------- package.json | 2 +- test.js | 9 +--- 6 files changed, 37 insertions(+), 123 deletions(-) create mode 100644 classes/FileManager.js delete mode 100644 package-lock.json diff --git a/classes/FileManager.js b/classes/FileManager.js new file mode 100644 index 0000000..179d5e6 --- /dev/null +++ b/classes/FileManager.js @@ -0,0 +1,30 @@ +/* +from BookmanDB: https://www.npmjs.com/package/bookman +*/ +const { writeFileSync, mkdirSync, existsSync, readFileSync, createWriteStream } = require("fs"); +const SuperError = require("./SuperError"); + +module.exports = class FileManager { + static writeFile(r, o) { + writeFileSync(`./${r}`, JSON.stringify(o, null, 4), (r) => { + if (r) throw new SuperError("CanNotWriteFile", r.toString()); + }); + } + static checkFile(file) { + let r = file.split("/"); + r.length > 1 && (r.pop(), (r = r.join("/")), existsSync(r) || mkdirSync(`./${r}/`, { recursive: !0 })); + + try { + let t = JSON.parse(readFileSync(`./${file}`, "utf8")); + t || ((t = []), this.writeFile(file, t)); + } catch (r) { + try { + createWriteStream(`./${file}`); + let r = []; + this.writeFile(file, r); + } catch (e) { + throw new SuperError("CanNotCreateExportFile", e.toString()); + } + } + } +} \ No newline at end of file diff --git a/classes/ReactionRole.js b/classes/ReactionRole.js index 698f2f7..4040fa5 100644 --- a/classes/ReactionRole.js +++ b/classes/ReactionRole.js @@ -1,5 +1,6 @@ const { Client } = require("discord.js"); const SuperError = require("./SuperError"); +const FileManager = require("./FileManager"); module.exports = function ReactionRole(token) { self = this; @@ -7,6 +8,7 @@ module.exports = function ReactionRole(token) { self.token = token; self.config = []; self.client = new Client(); + self.fileManager = FileManager; self.createOption = (...arguments) => require("../methods/createOption")(...arguments); self.createMessage = (...arguments) => require("../methods/createMessage")(self, ...arguments); diff --git a/methods/exportConfig.js b/methods/exportConfig.js index c36fb2d..1f7a3b8 100644 --- a/methods/exportConfig.js +++ b/methods/exportConfig.js @@ -1,10 +1,4 @@ -const fs = require("fs"); -const SuperError = require("../classes/SuperError"); - module.exports = (self, file) => { - try { - fs.writeFileSync(file, JSON.stringify(self.config, null, 4)); - } catch (err) { - throw new SuperError("CanNotWriteFile", err.toString()); - }; + self.fileManager.checkFile(file); + self.fileManager.writeFile(file, self.config); }; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 7da738d..0000000 --- a/package-lock.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "name": "reaction-role", - "version": "2.0.1", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@discordjs/collection": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.1.5.tgz", - "integrity": "sha512-CU1q0UXQUpFNzNB7gufgoisDHP7n+T3tkqTsp3MNUkVJ5+hS3BCvME8uCXAUFlz+6T2FbTCu75A+yQ7HMKqRKw==" - }, - "@discordjs/form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@discordjs/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-ZfFsbgEXW71Rw/6EtBdrP5VxBJy4dthyC0tpQKGKmYFImlmmrykO14Za+BiIVduwjte0jXEBlhSKf0MWbFp9Eg==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - } - }, - "abort-controller": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", - "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", - "requires": { - "event-target-shim": "^5.0.0" - } - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "discord.js": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-12.2.0.tgz", - "integrity": "sha512-Ueb/0SOsxXyqwvwFYFe0msMrGqH1OMqpp2Dpbplnlr4MzcRrFWwsBM9gKNZXPVBHWUKiQkwU8AihXBXIvTTSvg==", - "requires": { - "@discordjs/collection": "^0.1.5", - "@discordjs/form-data": "^3.0.1", - "abort-controller": "^3.0.0", - "node-fetch": "^2.6.0", - "prism-media": "^1.2.0", - "setimmediate": "^1.0.5", - "tweetnacl": "^1.0.3", - "ws": "^7.2.1" - } - }, - "event-target-shim": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", - "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==" - }, - "mime-db": { - "version": "1.44.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", - "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" - }, - "mime-types": { - "version": "2.1.27", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", - "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", - "requires": { - "mime-db": "1.44.0" - } - }, - "node-fetch": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", - "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==" - }, - "prism-media": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/prism-media/-/prism-media-1.2.2.tgz", - "integrity": "sha512-I+nkWY212lJ500jLe4tN9tWO7nRiBAVdMv76P9kffZjYhw20raMlW1HSSvS+MLXC9MmbNZCazMrAr+5jEEgTuw==" - }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" - }, - "tweetnacl": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", - "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==" - }, - "ws": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.3.1.tgz", - "integrity": "sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA==" - } - } -} diff --git a/package.json b/package.json index aee2b61..f813d2f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "reaction-role", - "version": "2.0.1", + "version": "2.0.2", "description": "ReactionRole is a module that allows you to create Discord reaction role easily!", "main": "classes/ReactionRole.js", "scripts": { diff --git a/test.js b/test.js index 0512ece..a387faf 100644 --- a/test.js +++ b/test.js @@ -1,15 +1,10 @@ const ReactionRole = require("."); const system = new ReactionRole("TOKEN"); -/*let option1 = system.createOption("✅", "697809380137107478"); +let option1 = system.createOption("✅", "697809380137107478"); let option2 = system.createOption("rifcat:720623460321198152", "708355720436777033"); let option3 = system.createOption("cat1:720623437466435626", "703908514887761930"); -system.createMessage("727272497157898372", "702115562158948432", 2, null, option1, option2, option3);*/ -system.importConfig(require("./config.json")); - -console.log(system.config) - -system.exportConfig("test/deneme") +system.createMessage("727272497157898372", "702115562158948432", 2, null, option1, option2, option3); system.init(); \ No newline at end of file