Rename config.js to cfg.js

So people don't accidentally edit the config source file rather than
their own config file.
cshd
Dragory 2020-07-19 13:35:54 +03:00
parent 3723bf788b
commit 6b8c7e1bdf
No known key found for this signature in database
GPG Key ID: 5F387BA66DF8AAC1
23 changed files with 22 additions and 22 deletions

View File

@ -1,2 +1,2 @@
const config = require('./src/config'); const config = require('./src/cfg');
module.exports = config.knex; module.exports = config.knex;

View File

@ -1,5 +1,5 @@
const Eris = require('eris'); const Eris = require('eris');
const config = require('./config'); const config = require('./cfg');
const bot = new Eris.Client(config.token, { const bot = new Eris.Client(config.token, {
getAllUsers: true, getAllUsers: true,

View File

@ -1,5 +1,5 @@
const { CommandManager, defaultParameterTypes, TypeConversionError } = require('knub-command-manager'); const { CommandManager, defaultParameterTypes, TypeConversionError } = require('knub-command-manager');
const config = require('./config'); const config = require('./cfg');
const utils = require('./utils'); const utils = require('./utils');
const threads = require('./data/threads'); const threads = require('./data/threads');

View File

@ -4,7 +4,7 @@ const Eris = require('eris');
const bot = require('../bot'); const bot = require('../bot');
const knex = require('../knex'); const knex = require('../knex');
const utils = require('../utils'); const utils = require('../utils');
const config = require('../config'); const config = require('../cfg');
const attachments = require('./attachments'); const attachments = require('./attachments');
const { formatters } = require('../formatters'); const { formatters } = require('../formatters');

View File

@ -3,7 +3,7 @@ const fs = require('fs');
const https = require('https'); const https = require('https');
const {promisify} = require('util'); const {promisify} = require('util');
const tmp = require('tmp'); const tmp = require('tmp');
const config = require('../config'); const config = require('../cfg');
const utils = require('../utils'); const utils = require('../utils');
const mv = promisify(require('mv')); const mv = promisify(require('mv'));

View File

@ -7,7 +7,7 @@ const humanizeDuration = require('humanize-duration');
const bot = require('../bot'); const bot = require('../bot');
const knex = require('../knex'); const knex = require('../knex');
const config = require('../config'); const config = require('../cfg');
const utils = require('../utils'); const utils = require('../utils');
const updates = require('./updates'); const updates = require('./updates');

View File

@ -2,7 +2,7 @@ const url = require('url');
const https = require('https'); const https = require('https');
const moment = require('moment'); const moment = require('moment');
const knex = require('../knex'); const knex = require('../knex');
const config = require('../config'); const config = require('../cfg');
const UPDATE_CHECK_FREQUENCY = 12; // In hours const UPDATE_CHECK_FREQUENCY = 12; // In hours
let updateCheckPromise = null; let updateCheckPromise = null;

View File

@ -1,6 +1,6 @@
const Eris = require('eris'); const Eris = require('eris');
const utils = require('./utils'); const utils = require('./utils');
const config = require('./config'); const config = require('./cfg');
/** /**
* Function to format the DM that is sent to the user when a staff member replies to them via !reply * Function to format the DM that is sent to the user when a staff member replies to them via !reply

View File

@ -41,7 +41,7 @@ try {
process.exit(1); process.exit(1);
} }
const config = require('./config'); const config = require('./cfg');
const utils = require('./utils'); const utils = require('./utils');
const main = require('./main'); const main = require('./main');
const knex = require('./knex'); const knex = require('./knex');

View File

@ -1,2 +1,2 @@
const config = require('./config'); const config = require('./cfg');
module.exports = require('knex')(config.knex); module.exports = require('knex')(config.knex);

View File

@ -1,6 +1,6 @@
const fs = require('fs'); const fs = require('fs');
const path = require('path'); const path = require('path');
const config = require('../config'); const config = require('../cfg');
const dbDir = config.dbDir; const dbDir = config.dbDir;

View File

@ -5,7 +5,7 @@ const moment = require('moment');
const Eris = require('eris'); const Eris = require('eris');
const knex = require('../knex'); const knex = require('../knex');
const config = require('../config'); const config = require('../cfg');
const jsonDb = require('./jsonDb'); const jsonDb = require('./jsonDb');
const threads = require('../data/threads'); const threads = require('../data/threads');

View File

@ -1,7 +1,7 @@
const Eris = require('eris'); const Eris = require('eris');
const path = require('path'); const path = require('path');
const config = require('./config'); const config = require('./cfg');
const bot = require('./bot'); const bot = require('./bot');
const knex = require('./knex'); const knex = require('./knex');
const {messageQueue} = require('./queue'); const {messageQueue} = require('./queue');

View File

@ -1,6 +1,6 @@
const moment = require('moment'); const moment = require('moment');
const Eris = require('eris'); const Eris = require('eris');
const config = require('../config'); const config = require('../cfg');
const utils = require('../utils'); const utils = require('../utils');
const threads = require('../data/threads'); const threads = require('../data/threads');
const blocked = require('../data/blocked'); const blocked = require('../data/blocked');

View File

@ -1,6 +1,6 @@
const path = require('path'); const path = require('path');
const fs = require('fs'); const fs = require('fs');
const config = require('../config'); const config = require('../cfg');
const utils = require('../utils'); const utils = require('../utils');
module.exports = ({ bot }) => { module.exports = ({ bot }) => {

View File

@ -1,4 +1,4 @@
const config = require('../config'); const config = require('../cfg');
const Eris = require('eris'); const Eris = require('eris');
const transliterate = require("transliteration"); const transliterate = require("transliteration");
const erisEndpoints = require('eris/lib/rest/Endpoints'); const erisEndpoints = require('eris/lib/rest/Endpoints');

View File

@ -1,6 +1,6 @@
const threads = require('../data/threads'); const threads = require('../data/threads');
const snippets = require('../data/snippets'); const snippets = require('../data/snippets');
const config = require('../config'); const config = require('../cfg');
const utils = require('../utils'); const utils = require('../utils');
const { parseArguments } = require('knub-command-manager'); const { parseArguments } = require('knub-command-manager');

View File

@ -1,7 +1,7 @@
const moment = require('moment'); const moment = require('moment');
const threads = require("../data/threads"); const threads = require("../data/threads");
const utils = require('../utils'); const utils = require('../utils');
const config = require('../config'); const config = require('../cfg');
const {THREAD_STATUS} = require('../data/constants'); const {THREAD_STATUS} = require('../data/constants');

View File

@ -1,4 +1,4 @@
const config = require('../config'); const config = require('../cfg');
const threads = require("../data/threads"); const threads = require("../data/threads");
const Eris = require("eris"); const Eris = require("eris");

View File

@ -3,7 +3,7 @@ const fs = require('fs');
const {promisify} = require('util'); const {promisify} = require('util');
const utils = require("../utils"); const utils = require("../utils");
const updates = require('../data/updates'); const updates = require('../data/updates');
const config = require('../config'); const config = require('../cfg');
const access = promisify(fs.access); const access = promisify(fs.access);
const readFile = promisify(fs.readFile); const readFile = promisify(fs.readFile);

View File

@ -4,7 +4,7 @@ const url = require('url');
const fs = require('fs'); const fs = require('fs');
const qs = require('querystring'); const qs = require('querystring');
const moment = require('moment'); const moment = require('moment');
const config = require('../config'); const config = require('../cfg');
const threads = require('../data/threads'); const threads = require('../data/threads');
const attachments = require('../data/attachments'); const attachments = require('../data/attachments');

View File

@ -3,7 +3,7 @@ const bot = require('./bot');
const moment = require('moment'); const moment = require('moment');
const humanizeDuration = require('humanize-duration'); const humanizeDuration = require('humanize-duration');
const publicIp = require('public-ip'); const publicIp = require('public-ip');
const config = require('./config'); const config = require('./cfg');
class BotError extends Error {} class BotError extends Error {}