Skip to content

Commit 45c52de

Browse files
authored
Merge pull request #507 from Pycord-Development/actx-attributes
ApplicationContext attributes
2 parents c50d0b9 + e3e01ac commit 45c52de

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

discord/commands/context.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,13 @@ class ApplicationContext(discord.abc.Messageable):
6969
def __init__(self, bot: Bot, interaction: Interaction):
7070
self.bot = bot
7171
self.interaction = interaction
72+
73+
# below attributes will be set after initialization
7274
self.command: ApplicationCommand = None # type: ignore
75+
self.focused: Option = None # type: ignore
76+
self.value: str = None # type: ignore
77+
self.options: dict = None # type: ignore
78+
7379
self._state: ConnectionState = self.interaction._state
7480

7581
async def _get_channel(self) -> discord.abc.Messageable:
@@ -180,10 +186,10 @@ def __init__(self, bot: Bot, interaction: Interaction) -> None:
180186
self.bot = bot
181187
self.interaction = interaction
182188

183-
# self.command = command
184-
# self.focused = focused
185-
# self.value = value
186-
# self.options = options
189+
self.command: ApplicationCommand = None # type: ignore
190+
self.focused: Option = None # type: ignore
191+
self.value: str = None # type: ignore
192+
self.options: dict = None # type: ignore
187193

188194
@property
189195
def cog(self) -> Optional[Cog]:

0 commit comments

Comments
 (0)