diff options
author | 2020-08-20 22:38:34 +0100 | |
---|---|---|
committer | 2020-08-20 22:38:34 +0100 | |
commit | 2cde858674fa6b4828f1a91028a62fb986c874f0 (patch) | |
tree | f76fc72259fcb656bacd4f338d3373622386ece0 | |
parent | Merge pull request #424 from python-discord/statuscats (diff) |
Temporarily remove message functionality from Fun
Remove message link functionality from uwu and randomcase due to a security vulnerability
-rw-r--r-- | bot/exts/evergreen/fun.py | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/bot/exts/evergreen/fun.py b/bot/exts/evergreen/fun.py index 67a4bae5..b2c0aad9 100644 --- a/bot/exts/evergreen/fun.py +++ b/bot/exts/evergreen/fun.py @@ -49,8 +49,6 @@ class Fun(Cog): async def uwu_command(self, ctx: Context, *, text: str) -> None: """ Converts a given `text` into it's uwu equivalent. - - Also accepts a valid discord Message ID or link. """ conversion_func = functools.partial( utils.replace_many, replacements=UWU_WORDS, ignore_case=True, match_case=True @@ -69,8 +67,6 @@ class Fun(Cog): async def randomcase_command(self, ctx: Context, *, text: str) -> None: """ Randomly converts the casing of a given `text`. - - Also accepts a valid discord Message ID or link. """ def conversion_func(text: str) -> str: """Randomly converts the casing of a given string.""" @@ -97,12 +93,14 @@ class Fun(Cog): Union[Embed, None]: The embed if found in the valid Message, else None """ embed = None - message = await Fun._get_discord_message(ctx, text) - if isinstance(message, Message): - text = message.content - # Take first embed because we can't send multiple embeds - if message.embeds: - embed = message.embeds[0] + + # message = await Fun._get_discord_message(ctx, text) + # if isinstance(message, Message): + # text = message.content + # # Take first embed because we can't send multiple embeds + # if message.embeds: + # embed = message.embeds[0] + return (text, embed) @staticmethod |