feat(shard): ✨ Now the amount of bans also counts towards whether a user can be warned or not.
This commit is contained in:
@@ -86,7 +86,7 @@ class ReportView(discord.ui.View):
|
|||||||
|
|
||||||
user = await models.User.get_cache_or_db(self.bot.redis, self.report.user_id)
|
user = await models.User.get_cache_or_db(self.bot.redis, self.report.user_id)
|
||||||
|
|
||||||
if select.values[0] == "warn" and user.warns_count < 3:
|
if select.values[0] == "warn" and user.warns_count + user.bans_count < 3:
|
||||||
user.warns_count += 1
|
user.warns_count += 1
|
||||||
await user.save(force_update=True)
|
await user.save(force_update=True)
|
||||||
await user.set_cache(self.bot.redis)
|
await user.set_cache(self.bot.redis)
|
||||||
|
|||||||
Reference in New Issue
Block a user