Skip to content

Commit

Permalink
Temp fix human_only check
Browse files Browse the repository at this point in the history
  • Loading branch information
tandemdude committed Jan 3, 2021
1 parent da9b77e commit d559b6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lightbulb/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ async def _bot_only(ctx: context.Context) -> bool:


async def _webhook_only(ctx: context.Context) -> bool:
if not ctx.author.is_webhook:
if ctx.message.webhook_id is None:
raise errors.WebhookOnly(f"Only a webhook can use {ctx.invoked_with}")
return True


async def _human_only(ctx: context.Context) -> bool:
if not ctx.author.is_human:
if ctx.author.is_bot or ctx.message.webhook_id is not None:
raise errors.HumanOnly(f"Only an human can use {ctx.invoked_with}")
return True

Expand Down

0 comments on commit d559b6a

Please sign in to comment.