From 28ff1f6d035c9361a45f5e1d431de5602dae1262 Mon Sep 17 00:00:00 2001 From: Evanroby Date: Thu, 28 May 2026 18:09:17 +0200 Subject: [PATCH] Fix check_100_plus return value and missing i18n in cleanup cog (#6782) Co-authored-by: Jakub Kuczys --- redbot/cogs/cleanup/cleanup.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/redbot/cogs/cleanup/cleanup.py b/redbot/cogs/cleanup/cleanup.py index 79e36dede..58e498221 100644 --- a/redbot/cogs/cleanup/cleanup.py +++ b/redbot/cogs/cleanup/cleanup.py @@ -51,12 +51,13 @@ class Cleanup(commands.Cog): Tries its best to cleanup after itself if the response is positive. """ + if number > 2**63 - 1: + await ctx.send(_("Try a smaller number instead.")) + return False + if ctx.assume_yes: return True - if number > 2**63 - 1: - return await ctx.send(_("Try a smaller number instead.")) - prompt = await ctx.send( _("Are you sure you want to delete {number} messages?").format( number=humanize_number(number) @@ -453,13 +454,13 @@ class Cleanup(commands.Cog): mone = await channel.fetch_message(one) except discord.errors.NotFound: return await ctx.send( - _("Could not find a message with the ID of {id}.".format(id=one)) + _("Could not find a message with the ID of {id}.").format(id=one) ) try: mtwo = await channel.fetch_message(two) except discord.errors.NotFound: return await ctx.send( - _("Could not find a message with the ID of {id}.".format(id=two)) + _("Could not find a message with the ID of {id}.").format(id=two) ) to_delete = await self.get_messages_for_deletion( channel=channel, before=mtwo, after=mone, delete_pinned=delete_pinned