mirror of
https://github.com/miaowware/qrm2.git
synced 2024-11-25 17:28:43 -05:00
parent
4139b23fe6
commit
ab73001340
@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- Renamed `?cond` to `?solar`.
|
||||
### Fixed
|
||||
- Weird image caching situation for `?greyline` on Discord's side.
|
||||
- The help command was not using the prefix it was invoked with.
|
||||
### Deprecated
|
||||
- `?ungrid`.
|
||||
- Deprecated old `?solar` aliases (`?cond`, etc).
|
||||
|
@ -18,13 +18,12 @@ import discord.ext.commands as commands
|
||||
import info
|
||||
import common as cmn
|
||||
|
||||
import data.options as opt
|
||||
|
||||
|
||||
class QrmHelpCommand(commands.HelpCommand):
|
||||
def __init__(self):
|
||||
super().__init__(command_attrs={"help": "Shows help about qrm or a command", "aliases": ["h"]})
|
||||
self.verify_checks = True
|
||||
self.context: commands.Context
|
||||
|
||||
async def get_bot_mapping(self):
|
||||
bot = self.context.bot
|
||||
@ -46,9 +45,9 @@ class QrmHelpCommand(commands.HelpCommand):
|
||||
if parent:
|
||||
fmt = f"{parent} {fmt}"
|
||||
alias = fmt
|
||||
return f"{opt.display_prefix}{alias} {command.signature}\n *Aliases:* {aliases}"
|
||||
return f"{self.context.prefix}{alias} {command.signature}\n *Aliases:* {aliases}"
|
||||
alias = command.name if not parent else f"{parent} {command.name}"
|
||||
return f"{opt.display_prefix}{alias} {command.signature}"
|
||||
return f"{self.context.prefix}{alias} {command.signature}"
|
||||
|
||||
async def send_error_message(self, error):
|
||||
embed = cmn.embed_factory(self.context)
|
||||
@ -60,7 +59,7 @@ class QrmHelpCommand(commands.HelpCommand):
|
||||
async def send_bot_help(self, mapping):
|
||||
embed = cmn.embed_factory(self.context)
|
||||
embed.title = "qrm Help"
|
||||
embed.description = (f"For command-specific help and usage, use `{opt.display_prefix}help [command name]`."
|
||||
embed.description = (f"For command-specific help and usage, use `{self.context.prefix}help [command name]`."
|
||||
" Many commands have shorter aliases.")
|
||||
mapping = await mapping
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user