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:
@@ -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'));
|
||||
|
Reference in New Issue
Block a user