Skip to content

Commit 28ff1f6

Browse files
EvanrobyJackenmen
andauthored
Fix check_100_plus return value and missing i18n in cleanup cog (#6782)
Co-authored-by: Jakub Kuczys <me@jacken.men>
1 parent 60199c8 commit 28ff1f6

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

redbot/cogs/cleanup/cleanup.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,13 @@ async def check_100_plus(ctx: commands.Context, number: int) -> bool:
5151
Tries its best to cleanup after itself if the response is positive.
5252
"""
5353

54+
if number > 2**63 - 1:
55+
await ctx.send(_("Try a smaller number instead."))
56+
return False
57+
5458
if ctx.assume_yes:
5559
return True
5660

57-
if number > 2**63 - 1:
58-
return await ctx.send(_("Try a smaller number instead."))
59-
6061
prompt = await ctx.send(
6162
_("Are you sure you want to delete {number} messages?").format(
6263
number=humanize_number(number)
@@ -453,13 +454,13 @@ async def between(
453454
mone = await channel.fetch_message(one)
454455
except discord.errors.NotFound:
455456
return await ctx.send(
456-
_("Could not find a message with the ID of {id}.".format(id=one))
457+
_("Could not find a message with the ID of {id}.").format(id=one)
457458
)
458459
try:
459460
mtwo = await channel.fetch_message(two)
460461
except discord.errors.NotFound:
461462
return await ctx.send(
462-
_("Could not find a message with the ID of {id}.".format(id=two))
463+
_("Could not find a message with the ID of {id}.").format(id=two)
463464
)
464465
to_delete = await self.get_messages_for_deletion(
465466
channel=channel, before=mtwo, after=mone, delete_pinned=delete_pinned

0 commit comments

Comments
 (0)