From f464f8422a9d33fc09f9a977b011ce362e7e94c3 Mon Sep 17 00:00:00 2001 From: Thomas Petersson Date: Sun, 12 Jan 2020 16:14:05 +0100 Subject: feat(!rules): allow for throw away words after the command call --- bot/cogs/alias.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bot/cogs/alias.py b/bot/cogs/alias.py index c1db38462..2b499a537 100644 --- a/bot/cogs/alias.py +++ b/bot/cogs/alias.py @@ -3,7 +3,10 @@ import logging from typing import Union from discord import Colour, Embed, Member, User -from discord.ext.commands import Cog, Command, Context, clean_content, command, group +from discord.ext.commands import ( + Cog, Command, Context, clean_content, + command, Greedy, group, +) from bot.bot import Bot from bot.cogs.extensions import Extension @@ -81,7 +84,7 @@ class Alias (Cog): await self.invoke(ctx, "site faq") @command(name="rules", aliases=("rule",), hidden=True) - async def site_rules_alias(self, ctx: Context, *rules: int) -> None: + async def site_rules_alias(self, ctx: Context, rules: Greedy[int], *_: str) -> None: """Alias for invoking site rules.""" await self.invoke(ctx, "site rules", *rules) -- cgit v1.2.3