Skip to content

Commit

Permalink
misc: gitting gud
Browse files Browse the repository at this point in the history
  • Loading branch information
seven7ty committed Jun 28, 2024
1 parent ff03bda commit 53e8264
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cogs/backend/handle/errors/_error_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@
if TYPE_CHECKING:
from lib.structs import GitBot


def silenced(ctx: GitBotContext, error) -> bool:
return bool(getattr(ctx, f'__silence_{ctx.bot.mgr.to_snake_case(error.__class__.__name__)}_error__', False))


async def respond_to_command_doesnt_exist(ctx: GitBotContext, error: commands.CommandNotFound) -> discord.Message:
async def respond_to_command_doesnt_exist(ctx: GitBotContext, error: commands.CommandNotFound) -> discord.Message | None:
if len(ctx.message.content) == (len(ctx.prefix) + 3) and 'gud' in ctx.message.content:
await ctx.message.add_reaction('🤣')
return
ctx.fmt.set_prefix('errors command_not_found')
embed: GitBotEmbed = GitBotEmbed(
color=0x0384fc,
Expand Down

0 comments on commit 53e8264

Please sign in to comment.