Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
MattBSG committed May 18, 2024
2 parents cf6b721 + 7044e42 commit bf448cb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions modules/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,9 @@ async def on_raw_reaction_add(self, payload):
async def _clean(self, ctx, messages: int, users: commands.Greedy[discord.User], extra: typing.Optional[str]):
if extra:
# This var will contain data if the greedy fails, such as if a non-ID or message ID are provided instead of a user
return await ctx.send(f'{config.redTick} Some user(s) passed are invalid. Please check the ID(s) and ensure they are correct')
return await ctx.send(
f'{config.redTick} Some user(s) passed are invalid. Please check the ID(s) and ensure they are correct'
)

if messages > 2000 or messages <= 0:
return await ctx.send(
Expand All @@ -225,7 +227,9 @@ async def _clean(self, ctx, messages: int, users: commands.Greedy[discord.User],
def confirm_check(reaction, member):
return member == ctx.author and str(reaction.emoji) in [config.redTick, config.greenTick]

confirmMsg = await ctx.send(f'This action will scan and delete up to {messages}, are you sure you want to proceed?')
confirmMsg = await ctx.send(
f'This action will scan and delete up to {messages}, are you sure you want to proceed?'
)
await confirmMsg.add_reaction(config.greenTick)
await confirmMsg.add_reaction(config.redTick)
try:
Expand Down

0 comments on commit bf448cb

Please sign in to comment.