diff --git a/redbot/core/commands/context.py b/redbot/core/commands/context.py index 32a3a2439..63bfe8707 100644 --- a/redbot/core/commands/context.py +++ b/redbot/core/commands/context.py @@ -1,6 +1,6 @@ import asyncio import contextlib -from typing import Iterable, List +from typing import Iterable, List, Union import discord from discord.ext import commands @@ -86,6 +86,22 @@ class Context(commands.Context): else: return True + async def react_quietly( + self, reaction: Union[discord.Emoji, discord.Reaction, discord.PartialEmoji, str] + ) -> bool: + """Adds a reaction to to the command message. + Returns + ------- + bool + :code:`True` if adding the reaction succeeded. + """ + try: + await self.message.add_reaction(reaction) + except discord.HTTPException: + return False + else: + return True + async def send_interactive( self, messages: Iterable[str], box_lang: str = None, timeout: int = 15 ) -> List[discord.Message]: