From afb14f53f4dc43163fe5d8528d94eadaf54fb34d Mon Sep 17 00:00:00 2001 From: Arjun Satarkar Date: Mon, 11 Mar 2024 01:44:12 -0400 Subject: Add skeleton of starboard cog; improve menu handling We were previously not escaping mentions right in `qotd list` and `qotd suggest`. I think everyone and here could have maybe got through? Not sure about the defaults there. Also improved the handling in Markov where previously we'd been 1. allowing mentions but 2. editing the message from a dummy one so they didn't ping, which I think was out of some idea of preserving the exact text of an exclusion but it seems inelegant. --- markov/markov.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'markov') diff --git a/markov/markov.py b/markov/markov.py index 8081b07..3399581 100644 --- a/markov/markov.py +++ b/markov/markov.py @@ -284,13 +284,14 @@ class Markov(commands.Cog): text = "" for i, string in enumerate(await config_value): text += f"{i + 1}. {repr(string)}\n" - pages = list(redbot.core.utils.chat_formatting.pagify(text)) + pages = list( + redbot.core.utils.chat_formatting.pagify( + discord.utils.escape_mentions(text) + ) + ) if pages: - message = await ctx.reply( - ".", allowed_mentions=discord.AllowedMentions.none() - ) - await redbot.core.utils.menus.menu(ctx, pages, message=message) + await redbot.core.utils.menus.menu(ctx, pages) else: await ctx.reply("No results.") -- cgit v1.2.3-57-g22cb