aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2021-03-28 23:39:41 +0100
committerGravatar GitHub <[email protected]>2021-03-28 23:39:41 +0100
commitba288b50ee94489e3231e8b220592a7a8861c2aa (patch)
tree5ddb83779e1de6e8a2dd551c8da8d4e67d281bbe
parentMerge pull request #1486 from python-discord/feat/dmrelay (diff)
parentUpdate bot/exts/info/information.py (diff)
Merge pull request #1488 from ToxicKidz/filter-mentions
-rw-r--r--bot/exts/info/information.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bot/exts/info/information.py b/bot/exts/info/information.py
index c54ca96bf..0555544ce 100644
--- a/bot/exts/info/information.py
+++ b/bot/exts/info/information.py
@@ -6,7 +6,7 @@ from collections import defaultdict
from typing import Any, DefaultDict, Dict, Mapping, Optional, Tuple, Union
import fuzzywuzzy
-from discord import Colour, Embed, Guild, Message, Role
+from discord import AllowedMentions, Colour, Embed, Guild, Message, Role
from discord.ext.commands import BucketType, Cog, Context, Paginator, command, group, has_any_role
from bot import constants
@@ -447,9 +447,9 @@ class Information(Cog):
def add_content(title: str, content: str) -> None:
paginator.add_line(f'== {title} ==\n')
- # replace backticks as it breaks out of code blocks. Spaces seemed to be the most reasonable solution.
- # we hope it's not close to 2000
- paginator.add_line(content.replace('```', '`` `'))
+ # Replace backticks as it breaks out of code blocks.
+ # An invisible character seemed to be the most reasonable solution. We hope it's not close to 2000.
+ paginator.add_line(content.replace('`', '`\u200b'))
paginator.close_page()
if message.content:
@@ -468,7 +468,7 @@ class Information(Cog):
add_content(title, transformer(item))
for page in paginator.pages:
- await ctx.send(page)
+ await ctx.send(page, allowed_mentions=AllowedMentions.none())
@raw.command()
async def json(self, ctx: Context, message: Message) -> None: