From 38a034e59b82f60f61a87d596290309247384e4b Mon Sep 17 00:00:00 2001 From: Sean <29239704+Bakersbakebread@users.noreply.github.com> Date: Sun, 17 May 2020 16:03:51 +0100 Subject: [PATCH] Don't allow to warn other bots (#3855) --- redbot/cogs/warnings/warnings.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/redbot/cogs/warnings/warnings.py b/redbot/cogs/warnings/warnings.py index ceb31c956..a71615779 100644 --- a/redbot/cogs/warnings/warnings.py +++ b/redbot/cogs/warnings/warnings.py @@ -323,6 +323,9 @@ class Warnings(commands.Cog): if user == ctx.author: await ctx.send(_("You cannot warn yourself.")) return + if user.bot: + await ctx.send(_("You cannot warn other bots.")) + return custom_allowed = await self.config.guild(ctx.guild).allow_custom_reasons() guild_settings = self.config.guild(ctx.guild) reason_type = None