From 49bef584b47ad022475f0aeb67d7776b6d2e98fa Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Fri, 3 Mar 2023 15:11:05 -0500 Subject: [PATCH] added a missing import --- info/info.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/info/info.py b/info/info.py index ab5faf4..97c7678 100644 --- a/info/info.py +++ b/info/info.py @@ -13,7 +13,8 @@ from redbot.core.utils.chat_formatting import ( humanize_timedelta, ) from redbot.core.utils.common_filters import ( - filter_invites + filter_invites, + escape_spoilers_and_mass_mentions ) @@ -346,6 +347,15 @@ class Info(commands.Cog): string += f"{status_string}\n" return string + async def get_names_and_nicks(self, user): + names = await self.config.user(user).past_names() + nicks = await self.config.member(user).past_nicks() + if names: + names = [escape_spoilers_and_mass_mentions(name) for name in names if name] + if nicks: + nicks = [escape_spoilers_and_mass_mentions(nick) for nick in nicks if nick] + return names, nicks + @commands.command() @commands.guild_only() @commands.bot_has_permissions(embed_links=True)