aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Ionite <[email protected]>2022-10-25 00:45:08 -0400
committerGravatar Ionite <[email protected]>2022-10-25 00:45:08 -0400
commit4d22554396e326539b05ac65a83b844a8dec965c (patch)
tree5efd6f4beb6655ec1f5fc468db4811e36c44182e
parentMerge pull request #2308 from python-discord/move_security_cog (diff)
Temporary fix for greedy parsing freezing
-rw-r--r--bot/exts/info/information.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/bot/exts/info/information.py b/bot/exts/info/information.py
index 2592e093d..088d0af6e 100644
--- a/bot/exts/info/information.py
+++ b/bot/exts/info/information.py
@@ -524,13 +524,16 @@ class Information(Cog):
await self.send_raw_content(ctx, message, json=True)
@command(aliases=("rule",))
- async def rules(self, ctx: Context, *args: Optional[str]) -> Optional[Set[int]]:
+ async def rules(self, ctx: Context, arg: Optional[str]) -> Optional[Set[int]]:
"""
Provides a link to all rules or, if specified, displays specific rule(s).
It accepts either rule numbers or particular keywords that map to a particular rule.
Rule numbers and keywords can be sent in any order.
"""
+ # Temporary fix for discord.py greedy string quote conversion bug
+ args = (arg or "",)
+
rules_embed = Embed(title="Rules", color=Colour.og_blurple(), url="https://www.pythondiscord.com/pages/rules")
keywords, rule_numbers = [], []