diff options
| author | 2019-12-22 19:15:32 -0800 | |
|---|---|---|
| committer | 2019-12-22 19:22:22 -0800 | |
| commit | 562af4fbef7d2b093eb76f563c5f1c635124e299 (patch) | |
| tree | db0b45e17b3887ec104a63b2f812b109ea711c24 /bot/cogs/alias.py | |
| parent | Use log.warning instead of the deprecated log.warn (diff) | |
Make FetchedUser a subclass of UserConverter
Diffstat (limited to '')
| -rw-r--r-- | bot/cogs/alias.py | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/bot/cogs/alias.py b/bot/cogs/alias.py index 03c49c2f4..e709be85d 100644 --- a/bot/cogs/alias.py +++ b/bot/cogs/alias.py @@ -1,8 +1,7 @@ import inspect import logging -from typing import Union -from discord import Colour, Embed, Member, User +from discord import Colour, Embed from discord.ext.commands import Cog, Command, Context, clean_content, command, group from bot.bot import Bot @@ -60,18 +59,12 @@ class Alias (Cog): await self.invoke(ctx, "site tools") @command(name="watch", hidden=True) - async def bigbrother_watch_alias( - self, - ctx: Context, - user: Union[Member, User, FetchedUser], - *, - reason: str - ) -> None: + async def bigbrother_watch_alias(self, ctx: Context, user: FetchedUser, *, reason: str) -> None: """Alias for invoking <prefix>bigbrother watch [user] [reason].""" await self.invoke(ctx, "bigbrother watch", user, reason=reason) @command(name="unwatch", hidden=True) - async def bigbrother_unwatch_alias(self, ctx: Context, user: Union[User, FetchedUser], *, reason: str) -> None: + async def bigbrother_unwatch_alias(self, ctx: Context, user: FetchedUser, *, reason: str) -> None: """Alias for invoking <prefix>bigbrother unwatch [user] [reason].""" await self.invoke(ctx, "bigbrother unwatch", user, reason=reason) @@ -137,12 +130,12 @@ class Alias (Cog): await self.invoke(ctx, "docs get", symbol) @command(name="nominate", hidden=True) - async def nomination_add_alias(self, ctx: Context, user: Union[Member, User, FetchedUser], *, reason: str) -> None: + async def nomination_add_alias(self, ctx: Context, user: FetchedUser, *, reason: str) -> None: """Alias for invoking <prefix>talentpool add [user] [reason].""" await self.invoke(ctx, "talentpool add", user, reason=reason) @command(name="unnominate", hidden=True) - async def nomination_end_alias(self, ctx: Context, user: Union[User, FetchedUser], *, reason: str) -> None: + async def nomination_end_alias(self, ctx: Context, user: FetchedUser, *, reason: str) -> None: """Alias for invoking <prefix>nomination end [user] [reason].""" await self.invoke(ctx, "nomination end", user, reason=reason) |