mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
[Core] Pagify cog unload output properly (#4469)
* [Core] Pagify cog unload output properly When you unload a large amount of cogs (close to message limit on characters), the character count is easily pushed over 2k characters on the command response with the cog names each being wrapped in 2x backticks. The current implementation breaks in the middle of cog names or wherever else it feels like it. 1600 might have been a safe value for splitting but at 1500 I don't see how multiple short cog names could make it break at least. * Address review
This commit is contained in:
parent
5c00810166
commit
ec94327b15
@ -1386,7 +1386,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic):
|
||||
|
||||
if output:
|
||||
total_message = "\n\n".join(output)
|
||||
for page in pagify(total_message):
|
||||
for page in pagify(
|
||||
total_message, delims=["\n", ", "], priority=True, page_length=1500
|
||||
):
|
||||
if page.startswith(", "):
|
||||
page = page[2:]
|
||||
await ctx.send(page)
|
||||
|
||||
@commands.command()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user