2
0
mirror of https://github.com/thedevs-network/the-guard-bot synced 2025-08-31 06:05:22 +00:00

Fix banning by reaching max warns

This commit is contained in:
Martin Rys
2021-05-08 22:28:42 +02:00
parent 96e6a3c761
commit f102102845

View File

@@ -18,6 +18,11 @@ if (process.env.NODE_ENV === 'development') {
module.exports = bot;
// Elsewhere the bot can't ban on reaching max warns due to botInfo not being available to get its admin ID
Object.defineProperty(bot.context, "botInfo", {
get () { return bot.botInfo; }
})
// cyclic dependency
// bot/index requires context requires actions/warn requires bot/index
Object.assign(bot.context, require('./context'));