|
|
@ -65,7 +65,7 @@ T = TypeVar('T') |
|
|
|
CFT = TypeVar('CFT', bound='CoroFunc') |
|
|
|
CXT = TypeVar('CXT', bound='Context') |
|
|
|
|
|
|
|
def when_mentioned(bot: Union[Bot, AutoShardedBot], msg: Message) -> List[str]: |
|
|
|
def when_mentioned(bot: Bot, msg: Message) -> List[str]: |
|
|
|
"""A callable that implements a command prefix equivalent to being mentioned. |
|
|
|
|
|
|
|
These are meant to be passed into the :attr:`.Bot.command_prefix` attribute. |
|
|
@ -73,7 +73,7 @@ def when_mentioned(bot: Union[Bot, AutoShardedBot], msg: Message) -> List[str]: |
|
|
|
# bot.user will never be None when this is called |
|
|
|
return [f'<@{bot.user.id}> ', f'<@!{bot.user.id}> '] # type: ignore |
|
|
|
|
|
|
|
def when_mentioned_or(*prefixes: str) -> Callable[[Union[Bot, AutoShardedBot], Message], List[str]]: |
|
|
|
def when_mentioned_or(*prefixes: str) -> Callable[[Bot, Message], List[str]]: |
|
|
|
"""A callable that implements when mentioned or other prefixes provided. |
|
|
|
|
|
|
|
These are meant to be passed into the :attr:`.Bot.command_prefix` attribute. |
|
|
|