hangover sync

This commit is contained in:
Katalina / stardust 2018-01-01 12:14:32 -06:00
parent 667666e53f
commit e763058ece
8 changed files with 48 additions and 15 deletions

View file

@ -174,8 +174,8 @@ class DiscordService extends Service {
}
}
]
// prefix regex with ^ for ease of code
.map(({regex, ...rest}) => ({ regex: new RegExp(`^${regex.source}`, regex.flags), ...rest }))
// prefix regex with ^ for ease of code
.map(({regex, ...rest}) => ({ regex: new RegExp(`^${regex.source}`, regex.flags), ...rest }))
return cmds
}
@ -209,13 +209,12 @@ class DiscordService extends Service {
if (message.mentions.users.has(this.client.user.id)) {
if (this.rootUsers.has(message.author.id)) {
this.handleCommand.call(this, message)
this.handleCommand(message)
} else {
this.mentionResponse.call(this, message)
this.mentionResponse(message)
}
}
}
}
module.exports = DiscordService