Skip to content

Commit

Permalink
feat: alias command to redirect to "add alias" or "remove alias"
Browse files Browse the repository at this point in the history
  • Loading branch information
Borketh committed Oct 31, 2024
1 parent 392a99b commit dda4202
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions fred/fred_commands/_baseclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,22 @@ async def get(self, ctx: commands.Context):
await self.bot.reply_to_msg(ctx.message, "Invalid sub command passed...")
return

@commands.command()
@commands.check(common.l4_only)
async def alias(self, ctx: commands.Context):
"""Usage: don't
Purpose: to remind people that this isn't how you do this command
Notes: see issue #102"""
probably_command = ctx.message.content.partition("alias")[2].split()[0]
if probably_command in ("add", "remove"):
await self.bot.reply_to_msg(
ctx.message, f"This is not the right command! Use `{probably_command} alias` instead!"
)
else:
await self.bot.reply_to_msg(
ctx.message, f"This wouldn't even be a valid command if you did it the right way around!"
)


class SearchFlags(commands.FlagConverter, delimiter="=", prefix="-"):
column: str = "name"
Expand Down

0 comments on commit dda4202

Please sign in to comment.