mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-06 17:32:31 -05:00
[V3 Help] add tagline support (#1705)
* [V3 Help] add tagline support * Make the tagline resettable * Actually, let's allow the user full control over the footer
This commit is contained in:
@@ -123,11 +123,7 @@ class Help(formatter.HelpFormatter):
|
||||
"""Formats command for output.
|
||||
|
||||
Returns a dict used to build embed"""
|
||||
emb = {
|
||||
"embed": {"title": "", "description": ""},
|
||||
"footer": {"text": self.get_ending_note()},
|
||||
"fields": [],
|
||||
}
|
||||
emb = {"embed": {"title": "", "description": ""}, "footer": {"text": ""}, "fields": []}
|
||||
|
||||
if self.is_cog():
|
||||
translator = getattr(self.command, "__translator__", lambda s: s)
|
||||
@@ -146,6 +142,13 @@ class Help(formatter.HelpFormatter):
|
||||
# <description> portion
|
||||
emb["embed"]["description"] = description[:2046]
|
||||
|
||||
tagline = await self.context.bot.db.help.tagline()
|
||||
if tagline:
|
||||
footer = tagline
|
||||
else:
|
||||
footer = self.get_ending_note()
|
||||
emb["footer"]["text"] = footer
|
||||
|
||||
if isinstance(self.command, discord.ext.commands.core.Command):
|
||||
# <signature portion>
|
||||
emb["embed"]["title"] = emb["embed"]["description"]
|
||||
|
||||
Reference in New Issue
Block a user