Rename config.js to cfg.js
So people don't accidentally edit the config source file rather than their own config file.cshd
parent
3723bf788b
commit
6b8c7e1bdf
|
@ -1,2 +1,2 @@
|
||||||
const config = require('./src/config');
|
const config = require('./src/cfg');
|
||||||
module.exports = config.knex;
|
module.exports = config.knex;
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -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');
|
||||||
|
|
||||||
|
|
|
@ -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');
|
||||||
|
|
||||||
|
|
|
@ -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'));
|
||||||
|
|
||||||
|
|
|
@ -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');
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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');
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
const config = require('./config');
|
const config = require('./cfg');
|
||||||
module.exports = require('knex')(config.knex);
|
module.exports = require('knex')(config.knex);
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -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');
|
||||||
|
|
||||||
|
|
|
@ -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');
|
||||||
|
|
|
@ -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');
|
||||||
|
|
|
@ -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 }) => {
|
||||||
|
|
|
@ -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');
|
||||||
|
|
|
@ -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');
|
||||||
|
|
||||||
|
|
|
@ -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');
|
||||||
|
|
||||||
|
|
|
@ -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");
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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');
|
||||||
|
|
||||||
|
|
|
@ -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 {}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue