diff --git a/discord/commands/context.py b/discord/commands/context.py index a348bffe68..9956ff2420 100644 --- a/discord/commands/context.py +++ b/discord/commands/context.py @@ -43,7 +43,7 @@ ) class ApplicationContext(discord.abc.Messageable): - """Represents a Discord interaction context. + """Represents a Discord application command interaction context. This class is not created manually and is instead passed to application commands as the first parameter. @@ -85,6 +85,10 @@ def guild(self) -> Optional[Guild]: def guild_id(self) -> Optional[int]: return self.interaction.guild_id + @cached_property + def me(self) -> Union[Member, User]: + return self.guild.me if self.guild is not None else self.bot.user + @cached_property def message(self) -> Optional[Message]: return self.interaction.message