We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1ea385a + 0ab81ab commit aa3ec7fCopy full SHA for aa3ec7f
discord/commands/context.py
@@ -43,7 +43,7 @@
43
)
44
45
class ApplicationContext(discord.abc.Messageable):
46
- """Represents a Discord interaction context.
+ """Represents a Discord application command interaction context.
47
48
This class is not created manually and is instead passed to application
49
commands as the first parameter.
@@ -85,6 +85,10 @@ def guild(self) -> Optional[Guild]:
85
def guild_id(self) -> Optional[int]:
86
return self.interaction.guild_id
87
88
+ @cached_property
89
+ def me(self) -> Union[Member, User]:
90
+ return self.guild.me if self.guild is not None else self.bot.user
91
+
92
@cached_property
93
def message(self) -> Optional[Message]:
94
return self.interaction.message
0 commit comments