fix redirects, fix server syncs on join

This commit is contained in:
Katalina / stardust 2018-01-17 23:12:11 -06:00
parent 032831aff1
commit f7238ab091
14 changed files with 132 additions and 101 deletions

View file

@ -34,6 +34,7 @@ class DiscordService extends Service {
if (this.isBot) {
this.log.info('this roleypoly is a bot')
this.client.on('message', this.handleMessage.bind(this))
this.client.on('guildCreate', this.handleJoin.bind(this))
}
for (let server of this.client.guilds.array()) {
@ -216,6 +217,10 @@ class DiscordService extends Service {
}
}
async handleJoin (guild) {
await this.ctx.server.ensure(guild)
}
}
module.exports = DiscordService