aboutsummaryrefslogtreecommitdiff
path: root/markov
diff options
context:
space:
mode:
authorArjun Satarkar <me@arjunsatarkar.net>2024-03-11 05:44:12 +0000
committerArjun Satarkar <me@arjunsatarkar.net>2024-03-11 05:44:12 +0000
commitafb14f53f4dc43163fe5d8528d94eadaf54fb34d (patch)
tree4e630d03ad07323aa492062bf1f7c6668eceb70d /markov
parent8cdeb0a316628f2e581e66e0c72442ac23c56a74 (diff)
downloadaps-cogs-afb14f53f4dc43163fe5d8528d94eadaf54fb34d.tar
aps-cogs-afb14f53f4dc43163fe5d8528d94eadaf54fb34d.tar.gz
aps-cogs-afb14f53f4dc43163fe5d8528d94eadaf54fb34d.zip
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.
Diffstat (limited to 'markov')
-rw-r--r--markov/markov.py11
1 files changed, 6 insertions, 5 deletions
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.")