DiscordService: swap to eris and refactor the entire service while we're at it.

This commit is contained in:
41666 2019-03-22 07:01:08 -05:00
parent 27fb06a197
commit 03ad4202b8
No known key found for this signature in database
GPG key ID: BC51D07640DC10AF
14 changed files with 4075 additions and 410 deletions

View file

@ -18,6 +18,9 @@ export default (ctx: AppContext, forceClear: ?boolean = false): {
const filename = path.basename(a)
const dirname = path.dirname(a)
const pathname = a.replace('rpc/', '')
delete require.cache[require.resolve(pathname)]
// internal stuff
if (filename.startsWith('_')) {
log.debug(`skipping ${a}`)
@ -37,10 +40,6 @@ export default (ctx: AppContext, forceClear: ?boolean = false): {
log.debug(`mounting ${a}`)
try {
const pathname = a.replace('rpc/', '')
delete require.cache[require.resolve(pathname)]
const r = require(pathname)
let o = r
if (o.default) {