mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-06-16 18:29:08 +00:00
fix redirects, fix server syncs on join
This commit is contained in:
parent
032831aff1
commit
f7238ab091
14 changed files with 132 additions and 101 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue