Add a command to set the bot description (#3340)

* description-command

* Cap the description length

* mmk
This commit is contained in:
Michael H
2020-01-13 10:12:31 -05:00
committed by GitHub
parent ab2e87a8fb
commit ef8b57a1d2
3 changed files with 31 additions and 3 deletions

View File

@@ -198,7 +198,7 @@ class RedHelpFormatter:
emb = {"embed": {"title": "", "description": ""}, "footer": {"text": ""}, "fields": []}
if description:
emb["embed"]["title"] = f"*{description[:2044]}*"
emb["embed"]["title"] = f"*{description[:250]}*"
emb["footer"]["text"] = tagline
emb["embed"]["description"] = signature
@@ -209,7 +209,7 @@ class RedHelpFormatter:
value = "\n\n".join(splitted[1:]).replace("[p]", ctx.clean_prefix)
if not value:
value = EMPTY_STRING
field = EmbedField(name[:252], value[:1024], False)
field = EmbedField(name[:250], value[:1024], False)
emb["fields"].append(field)
if subcommands:
@@ -442,7 +442,7 @@ class RedHelpFormatter:
emb["footer"]["text"] = tagline
if description:
emb["embed"]["title"] = f"*{description[:2044]}*"
emb["embed"]["title"] = f"*{description[:250]}*"
for cog_name, data in coms: