mirror of
https://github.com/thedevs-network/the-guard-bot
synced 2025-09-02 07:05:17 +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;
|
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
|
// cyclic dependency
|
||||||
// bot/index requires context requires actions/warn requires bot/index
|
// bot/index requires context requires actions/warn requires bot/index
|
||||||
Object.assign(bot.context, require('./context'));
|
Object.assign(bot.context, require('./context'));
|
||||||
|
Reference in New Issue
Block a user