UNPKG

discord-coc-bot

Version:

A Discord bot that contains commands useful for Call of Cthulu text roleplaying, based on RPbot by Gawdl3y (https://github.com/Gawdl3y/discord-rpbot/)

61 lines (47 loc) 2.07 kB
'use babel'; 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.config = undefined; var _yargs = require('yargs'); var _yargs2 = _interopRequireDefault(_yargs); var _bot = require('./bot'); var _bot2 = _interopRequireDefault(_bot); var _version = require('./version'); var _version2 = _interopRequireDefault(_version); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } _bot2.default.config.defaults.log = 'rpbot.log'; _bot2.default.config.defaults.storage = 'rpbot-storage'; _bot2.default.config.loadDefaults(); const config = exports.config = _bot2.default.config.yargs(_yargs2.default).usage('$0 [command] [options]').example('$0 --token SomeAPITokenGoesHere', 'Starts the bot using a token').example('$0 --email SomeGuy@SomeSite.com --password SomeCrazyPassword123', 'Starts the bot using an email and password').example('$0 --config settings.yml', 'Starts the bot using a config file').example('$0 completion', 'Outputs Bash completion script').epilogue(`coc-bot v${_version2.default} by Zora Xing: https://github.com/xingrz1993/discord-coc-bot/`) // Database .option('database', { type: 'string', default: 'rpbot.sqlite3', alias: 'd', describe: 'Path to SQLite3 database file', group: 'Database:', normalize: true }).option('database-verbose', { type: 'boolean', alias: 'V', describe: 'Whether or not SQLite3 should be put into verbose mode', group: 'Database:' }) // General .option('analytics', { type: 'boolean', default: true, alias: 'A', describe: 'Whether or not to enable anonymous, non-unique, non-identifiable analytics', group: 'General:' }).option('shard-count', { type: 'number', describe: 'Number of shards to spawn (only for rpbot-sharder)', group: 'General:' }) // General yargs .help().alias('help', 'h').group('help', 'Special:').version(_version2.default).alias('version', 'v').group('version', 'Special:').completion('completion').wrap(_yargs2.default.terminalWidth()).argv; exports.default = config; //# sourceMappingURL=config.js.map