@manybot/manybot 4.0.1 → 4.0.3

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/config.js +15 -21
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "name": "SyntaxError!",
6
6
  "email": "me@stxerr.dev"
7
7
  },
8
- "version": "4.0.1",
8
+ "version": "4.0.3",
9
9
  "license": "GPL-3.0-only",
10
10
  "private": false,
11
11
  "engines": {
package/src/config.js CHANGED
@@ -163,28 +163,22 @@ try {
163
163
  const baseConfig = await readFileSafe(CONFIG_FILE);
164
164
  const pluginConfig = await readFileSafe(PLUGIN_FILE);
165
165
 
166
- export const CONFIG = parseConf(baseConfig + "\n" + pluginConfig);
167
-
168
- /**
169
- * Common exports.
170
- */
171
- export const CLIENT_ID =
172
- CONFIG.CLIENT_ID ?? "manybot";
173
-
174
- export const CMD_PREFIX =
175
- CONFIG.CMD_PREFIX ?? "!";
176
-
177
- export const CHATS =
178
- CONFIG.CHATS ?? [];
179
-
180
- export const PLUGINS =
181
- CONFIG.PLUGINS ?? [];
182
-
183
- export const LANGUAGE =
184
- CONFIG.LANGUAGE ?? "en";
166
+ export const CONFIG = {
167
+ CMD_PREFIX: "!",
168
+ CLIENT_ID: "manybot",
169
+ CHATS: [],
170
+ PLUGINS: [],
171
+ LANGUAGE: "en",
172
+ PHONE_NUMBER: null,
173
+ ...parseConf(baseConfig + "\n" + pluginConfig),
174
+ };
185
175
 
186
- export const PHONE_NUMBER =
187
- CONFIG.PHONE_NUMBER ?? null;
176
+ export const CLIENT_ID = CONFIG.CLIENT_ID;
177
+ export const CMD_PREFIX = CONFIG.CMD_PREFIX;
178
+ export const CHATS = CONFIG.CHATS;
179
+ export const PLUGINS = CONFIG.PLUGINS;
180
+ export const LANGUAGE = CONFIG.LANGUAGE;
181
+ export const PHONE_NUMBER = CONFIG.PHONE_NUMBER;
188
182
 
189
183
  /**
190
184
  * Useful paths for plugins/modules.