Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
i-am-zaidali committed Aug 8, 2024
2 parents 5973e91 + c4c04d7 commit 83d2d42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sharedcd/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ async def scd_e(self, ctx: commands.Context, id: str, *, flags: SCDFlagsAllOPT):
lambda y: y[1] is not None,
map(
lambda x: (x, self.check_command_exists_as_scd(x)),
itertools.chain.from_iterable(flags._commands),
itertools.chain.from_iterable(flags._commands or []),
),
)
)
Expand All @@ -306,7 +306,7 @@ async def scd_e(self, ctx: commands.Context, id: str, *, flags: SCDFlagsAllOPT):
f"{cf.humanize_list(list(map(lambda x: f'`{x[0].qualified_name} (ID: {x[1].id})`', existing)))}"
)

if next(filter(lambda x: x.bot, itertools.chain.from_iterable(flags.bypass)), None):
if next(filter(lambda x: x.bot, itertools.chain.from_iterable(flags.bypass or [])), None):
return await ctx.send(
"Bots can not bypass SharedCooldowns since they can't run any commands in the first place."
)
Expand Down

0 comments on commit 83d2d42

Please sign in to comment.