mirror of https://github.com/miaowware/qrm2.git
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`.
|
- Renamed `?cond` to `?solar`.
|
||||||
### Fixed
|
### Fixed
|
||||||
- Weird image caching situation for `?greyline` on Discord's side.
|
- Weird image caching situation for `?greyline` on Discord's side.
|
||||||
|
- The help command was not using the prefix it was invoked with.
|
||||||
### Deprecated
|
### Deprecated
|
||||||
- `?ungrid`.
|
- `?ungrid`.
|
||||||
- Deprecated old `?solar` aliases (`?cond`, etc).
|
- Deprecated old `?solar` aliases (`?cond`, etc).
|
||||||
|
|
|
@ -18,13 +18,12 @@ import discord.ext.commands as commands
|
||||||
import info
|
import info
|
||||||
import common as cmn
|
import common as cmn
|
||||||
|
|
||||||
import data.options as opt
|
|
||||||
|
|
||||||
|
|
||||||
class QrmHelpCommand(commands.HelpCommand):
|
class QrmHelpCommand(commands.HelpCommand):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__(command_attrs={"help": "Shows help about qrm or a command", "aliases": ["h"]})
|
super().__init__(command_attrs={"help": "Shows help about qrm or a command", "aliases": ["h"]})
|
||||||
self.verify_checks = True
|
self.verify_checks = True
|
||||||
|
self.context: commands.Context
|
||||||
|
|
||||||
async def get_bot_mapping(self):
|
async def get_bot_mapping(self):
|
||||||
bot = self.context.bot
|
bot = self.context.bot
|
||||||
|
@ -46,9 +45,9 @@ class QrmHelpCommand(commands.HelpCommand):
|
||||||
if parent:
|
if parent:
|
||||||
fmt = f"{parent} {fmt}"
|
fmt = f"{parent} {fmt}"
|
||||||
alias = 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}"
|
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):
|
async def send_error_message(self, error):
|
||||||
embed = cmn.embed_factory(self.context)
|
embed = cmn.embed_factory(self.context)
|
||||||
|
@ -60,7 +59,7 @@ class QrmHelpCommand(commands.HelpCommand):
|
||||||
async def send_bot_help(self, mapping):
|
async def send_bot_help(self, mapping):
|
||||||
embed = cmn.embed_factory(self.context)
|
embed = cmn.embed_factory(self.context)
|
||||||
embed.title = "qrm Help"
|
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.")
|
" Many commands have shorter aliases.")
|
||||||
mapping = await mapping
|
mapping = await mapping
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue