mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-06 01:12:33 -05:00
Add a command to set the bot description (#3340)
* description-command * Cap the description length * mmk
This commit is contained in:
@@ -873,6 +873,32 @@ class Core(commands.Cog, CoreLogic):
|
||||
for page in pagify(settings):
|
||||
await ctx.send(box(page))
|
||||
|
||||
@checks.is_owner()
|
||||
@_set.command(name="description")
|
||||
async def setdescription(self, ctx: commands.Context, *, description: str = ""):
|
||||
"""
|
||||
Sets the bot's description.
|
||||
Use without a description to reset.
|
||||
This is shown in a few locations, including the help menu.
|
||||
|
||||
The default is "Red V3"
|
||||
"""
|
||||
if not description:
|
||||
await ctx.bot._config.description.clear()
|
||||
ctx.bot.description = "Red V3"
|
||||
await ctx.send(_("Description reset."))
|
||||
elif len(description) > 250: # While the limit is 256, we bold it adding characters.
|
||||
await ctx.send(
|
||||
_(
|
||||
"This description is too long to properly display. "
|
||||
"Please try again with below 250 characters"
|
||||
)
|
||||
)
|
||||
else:
|
||||
await ctx.bot._config.description.set(description)
|
||||
ctx.bot.description = description
|
||||
await ctx.tick()
|
||||
|
||||
@_set.command()
|
||||
@checks.guildowner()
|
||||
@commands.guild_only()
|
||||
|
||||
Reference in New Issue
Block a user