mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-06-17 02:29:10 +00:00
DiscordService: swap to eris and refactor the entire service while we're at it.
This commit is contained in:
parent
27fb06a197
commit
03ad4202b8
14 changed files with 4075 additions and 410 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue