We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Redesign ApplicationContext.respond
### Summary

The ApplicationContext.respond property needs to be redesigned.

### What is the feature request for?

The core library

### The Problem

The `ApplicationContext.respond` property  returns 2 different functions depending on `InteractionResponse.is_done()`. Both take different parameters and return different objects. This is bad practice because it can result in unexpected behavior. Also, type-hinting is kinda hard. 

### The Ideal Solution

It might make sense to create a function `ApplicationContext.respond` that merges all parameters. Depending on `InteractionResponse.is_done()` it ignores the parameter of the other function. The only remaining problem is the different return types. This would simplify the situation, but isn't perfect yet. Maybe someone got a better idea.

### The Current Solution

A property that returns 2 different functions depending on `InteractionResponse.is_done()`.

### Additional Context

_No response_

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `discord/commands/context.py`
Content:
```
1 """
2 The MIT License (MIT)
3 
4 Copyright (c) 2015-2021 Rapptz
5 Copyright (c) 2021-present Pycord Development
6 
7 Permission is hereby granted, free of charge, to any person obtaining a
8 copy of this software and associated documentation files (the "Software"),
9 to deal in the Software without restriction, including without limitation
10 the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 and/or sell copies of the Software, and to permit persons to whom the
12 Software is furnished to do so, subject to the following conditions:
13 
14 The above copyright notice and this permission notice shall be included in
15 all copies or substantial portions of the Software.
16 
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23 DEALINGS IN THE SOFTWARE.
24 """
25 from __future__ import annotations
26 
27 from typing import TYPE_CHECKING, Optional, Union
28 
29 import discord.abc
30 
31 if TYPE_CHECKING:
32     import discord
33     from discord import Bot
34     from discord.state import ConnectionState
35 
36     from .commands import ApplicationCommand, Option
37     from ..cog import Cog
38 
39 from ..guild import Guild
40 from ..interactions import Interaction, InteractionResponse
41 from ..member import Member
42 from ..message import Message
43 from ..user import User
44 from ..utils import cached_property
45 
46 __all__ = (
47     "ApplicationContext",
48     "AutocompleteContext"
49 )
50 
51 class ApplicationContext(discord.abc.Messageable):
52     """Represents a Discord application command interaction context.
53 
54     This class is not created manually and is instead passed to application
55     commands as the first parameter.
56 
57     .. versionadded:: 2.0
58 
59     Attributes
60     -----------
61     bot: :class:`.Bot`
62         The bot that the command belongs to.
63     interaction: :class:`.Interaction`
64         The interaction object that invoked the command.
65     command: :class:`.ApplicationCommand`
66         The command that this context belongs to.
67     """
68 
69     def __init__(self, bot: Bot, interaction: Interaction):
70         self.bot = bot
71         self.interaction = interaction
72 
73         # below attributes will be set after initialization
74         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 
79         self._state: ConnectionState = self.interaction._state
80 
81     async def _get_channel(self) -> discord.abc.Messageable:
82         return self.channel
83 
84     @cached_property
85     def channel(self):
86         return self.interaction.channel
87 
88     @cached_property
89     def channel_id(self) -> Optional[int]:
90         return self.interaction.channel_id
91 
92     @cached_property
93     def guild(self) -> Optional[Guild]:
94         return self.interaction.guild
95 
96     @cached_property
97     def guild_id(self) -> Optional[int]:
98         return self.interaction.guild_id
99 
100     @cached_property
101     def locale(self) -> Optional[str]:
102         return self.interaction.locale
103 
104     @cached_property
105     def guild_locale(self) -> Optional[str]:
106         return self.interaction.guild_locale
107 
108     @cached_property
109     def me(self) -> Union[Member, User]:
110         return self.guild.me if self.guild is not None else self.bot.user
111 
112     @cached_property
113     def message(self) -> Optional[Message]:
114         return self.interaction.message
115 
116     @cached_property
117     def user(self) -> Optional[Union[Member, User]]:
118         return self.interaction.user
119 
120     @cached_property
121     def author(self) -> Optional[Union[Member, User]]:
122         return self.user
123 
124     @property
125     def voice_client(self):
126         if self.guild is None:
127             return None
128         
129         return self.guild.voice_client
130 
131     @cached_property
132     def response(self) -> InteractionResponse:
133         return self.interaction.response
134 
135     @property
136     def respond(self):
137         return self.followup.send if self.response.is_done() else self.interaction.response.send_message
138 
139     @property
140     def defer(self):
141         return self.interaction.response.defer
142 
143     @property
144     def followup(self):
145         return self.interaction.followup
146 
147     async def delete(self):
148         """Calls :attr:`~discord.commands.ApplicationContext.respond`.
149         If the response is done, then calls :attr:`~discord.commands.ApplicationContext.respond` first."""
150         if not self.response.is_done():
151             await self.defer()
152 
153         return await self.interaction.delete_original_message()
154 
155     @property
156     def edit(self):
157         return self.interaction.edit_original_message
158 
159     @property
160     def cog(self) -> Optional[Cog]:
161         """Optional[:class:`.Cog`]: Returns the cog associated with this context's command. ``None`` if it does not exist."""
162         if self.command is None:
163             return None
164        
165         return self.command.cog
166 
167 
168 class AutocompleteContext:
169     """Represents context for a slash command's option autocomplete.
170 
171     This class is not created manually and is instead passed to an Option's autocomplete callback.
172 
173     .. versionadded:: 2.0
174 
175     Attributes
176     -----------
177     bot: :class:`.Bot`
178         The bot that the command belongs to.    
179     interaction: :class:`.Interaction`
180         The interaction object that invoked the autocomplete.
181     command: :class:`.ApplicationCommand`
182         The command that this context belongs to.
183     focused: :class:`.Option`
184         The option the user is currently typing.
185     value: :class:`.str`
186         The content of the focused option.
187     options :class:`.dict`
188         A name to value mapping of the options that the user has selected before this option.
189     """
190 
191     __slots__ = ("bot", "interaction", "command", "focused", "value", "options")
192     
193     def __init__(self, bot: Bot, interaction: Interaction) -> None:
194         self.bot = bot
195         self.interaction = interaction
196 
197         self.command: ApplicationCommand = None  # type: ignore
198         self.focused: Option = None  # type: ignore
199         self.value: str = None  # type: ignore
200         self.options: dict = None  # type: ignore
201 
202     @property
203     def cog(self) -> Optional[Cog]:
204         """Optional[:class:`.Cog`]: Returns the cog associated with this context's command. ``None`` if it does not exist."""
205         if self.command is None:
206             return None
207        
208         return self.command.cog
209
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/discord/commands/context.py b/discord/commands/context.py
--- a/discord/commands/context.py
+++ b/discord/commands/context.py
@@ -134,7 +134,26 @@
 
     @property
     def respond(self):
-        return self.followup.send if self.response.is_done() else self.interaction.response.send_message
+        if not self.response.is_done():
+            return self.interaction.response.send_message
+        else:
+            raise RuntimeError(f"Interaction was already issued a response. Try using {type(self).__name__}.send_followup() instead.")
+
+    @property
+    async def send_response(self) -> Callable[..., Union[Interaction, Webhook]]:
+        """Callable[..., Union[:class:`~.Interaction`, :class:`~.Webhook`]]: Sends either a response
+        or a followup response depending if the interaction has been responded to yet or not."""
+        if not self.response.is_done():
+            return self.interaction.response.send_message  # self.response
+        else:
+            return self.followup.send  # self.send_followup
+
+    @property
+    def send_followup(self):
+        if self.response.is_done():
+            return self.followup.send
+        else:
+            raise RuntimeError(f"Interaction was not yet issued a response. Try using {type(self).__name__}.respond() first.")
 
     @property
     def defer(self):

{"golden_diff": "diff --git a/discord/commands/context.py b/discord/commands/context.py\n--- a/discord/commands/context.py\n+++ b/discord/commands/context.py\n@@ -134,7 +134,26 @@\n \n     @property\n     def respond(self):\n-        return self.followup.send if self.response.is_done() else self.interaction.response.send_message\n+        if not self.response.is_done():\n+            return self.interaction.response.send_message\n+        else:\n+            raise RuntimeError(f\"Interaction was already issued a response. Try using {type(self).__name__}.send_followup() instead.\")\n+\n+    @property\n+    async def send_response(self) -> Callable[..., Union[Interaction, Webhook]]:\n+        \"\"\"Callable[..., Union[:class:`~.Interaction`, :class:`~.Webhook`]]: Sends either a response\n+        or a followup response depending if the interaction has been responded to yet or not.\"\"\"\n+        if not self.response.is_done():\n+            return self.interaction.response.send_message  # self.response\n+        else:\n+            return self.followup.send  # self.send_followup\n+\n+    @property\n+    def send_followup(self):\n+        if self.response.is_done():\n+            return self.followup.send\n+        else:\n+            raise RuntimeError(f\"Interaction was not yet issued a response. Try using {type(self).__name__}.respond() first.\")\n \n     @property\n     def defer(self):\n", "issue": "Redesign ApplicationContext.respond\n### Summary\n\nThe ApplicationContext.respond property needs to be redesigned.\n\n### What is the feature request for?\n\nThe core library\n\n### The Problem\n\nThe `ApplicationContext.respond` property  returns 2 different functions depending on `InteractionResponse.is_done()`. Both take different parameters and return different objects. This is bad practice because it can result in unexpected behavior. Also, type-hinting is kinda hard. \n\n### The Ideal Solution\n\nIt might make sense to create a function `ApplicationContext.respond` that merges all parameters. Depending on `InteractionResponse.is_done()` it ignores the parameter of the other function. The only remaining problem is the different return types. This would simplify the situation, but isn't perfect yet. Maybe someone got a better idea.\n\n### The Current Solution\n\nA property that returns 2 different functions depending on `InteractionResponse.is_done()`.\n\n### Additional Context\n\n_No response_\n", "before_files": [{"content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-2021 Rapptz\nCopyright (c) 2021-present Pycord Development\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\nfrom __future__ import annotations\n\nfrom typing import TYPE_CHECKING, Optional, Union\n\nimport discord.abc\n\nif TYPE_CHECKING:\n    import discord\n    from discord import Bot\n    from discord.state import ConnectionState\n\n    from .commands import ApplicationCommand, Option\n    from ..cog import Cog\n\nfrom ..guild import Guild\nfrom ..interactions import Interaction, InteractionResponse\nfrom ..member import Member\nfrom ..message import Message\nfrom ..user import User\nfrom ..utils import cached_property\n\n__all__ = (\n    \"ApplicationContext\",\n    \"AutocompleteContext\"\n)\n\nclass ApplicationContext(discord.abc.Messageable):\n    \"\"\"Represents a Discord application command interaction context.\n\n    This class is not created manually and is instead passed to application\n    commands as the first parameter.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    bot: :class:`.Bot`\n        The bot that the command belongs to.\n    interaction: :class:`.Interaction`\n        The interaction object that invoked the command.\n    command: :class:`.ApplicationCommand`\n        The command that this context belongs to.\n    \"\"\"\n\n    def __init__(self, bot: Bot, interaction: Interaction):\n        self.bot = bot\n        self.interaction = interaction\n\n        # below attributes will be set after initialization\n        self.command: ApplicationCommand = None  # type: ignore\n        self.focused: Option = None  # type: ignore\n        self.value: str = None  # type: ignore\n        self.options: dict = None  # type: ignore\n\n        self._state: ConnectionState = self.interaction._state\n\n    async def _get_channel(self) -> discord.abc.Messageable:\n        return self.channel\n\n    @cached_property\n    def channel(self):\n        return self.interaction.channel\n\n    @cached_property\n    def channel_id(self) -> Optional[int]:\n        return self.interaction.channel_id\n\n    @cached_property\n    def guild(self) -> Optional[Guild]:\n        return self.interaction.guild\n\n    @cached_property\n    def guild_id(self) -> Optional[int]:\n        return self.interaction.guild_id\n\n    @cached_property\n    def locale(self) -> Optional[str]:\n        return self.interaction.locale\n\n    @cached_property\n    def guild_locale(self) -> Optional[str]:\n        return self.interaction.guild_locale\n\n    @cached_property\n    def me(self) -> Union[Member, User]:\n        return self.guild.me if self.guild is not None else self.bot.user\n\n    @cached_property\n    def message(self) -> Optional[Message]:\n        return self.interaction.message\n\n    @cached_property\n    def user(self) -> Optional[Union[Member, User]]:\n        return self.interaction.user\n\n    @cached_property\n    def author(self) -> Optional[Union[Member, User]]:\n        return self.user\n\n    @property\n    def voice_client(self):\n        if self.guild is None:\n            return None\n        \n        return self.guild.voice_client\n\n    @cached_property\n    def response(self) -> InteractionResponse:\n        return self.interaction.response\n\n    @property\n    def respond(self):\n        return self.followup.send if self.response.is_done() else self.interaction.response.send_message\n\n    @property\n    def defer(self):\n        return self.interaction.response.defer\n\n    @property\n    def followup(self):\n        return self.interaction.followup\n\n    async def delete(self):\n        \"\"\"Calls :attr:`~discord.commands.ApplicationContext.respond`.\n        If the response is done, then calls :attr:`~discord.commands.ApplicationContext.respond` first.\"\"\"\n        if not self.response.is_done():\n            await self.defer()\n\n        return await self.interaction.delete_original_message()\n\n    @property\n    def edit(self):\n        return self.interaction.edit_original_message\n\n    @property\n    def cog(self) -> Optional[Cog]:\n        \"\"\"Optional[:class:`.Cog`]: Returns the cog associated with this context's command. ``None`` if it does not exist.\"\"\"\n        if self.command is None:\n            return None\n       \n        return self.command.cog\n\n\nclass AutocompleteContext:\n    \"\"\"Represents context for a slash command's option autocomplete.\n\n    This class is not created manually and is instead passed to an Option's autocomplete callback.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    bot: :class:`.Bot`\n        The bot that the command belongs to.    \n    interaction: :class:`.Interaction`\n        The interaction object that invoked the autocomplete.\n    command: :class:`.ApplicationCommand`\n        The command that this context belongs to.\n    focused: :class:`.Option`\n        The option the user is currently typing.\n    value: :class:`.str`\n        The content of the focused option.\n    options :class:`.dict`\n        A name to value mapping of the options that the user has selected before this option.\n    \"\"\"\n\n    __slots__ = (\"bot\", \"interaction\", \"command\", \"focused\", \"value\", \"options\")\n    \n    def __init__(self, bot: Bot, interaction: Interaction) -> None:\n        self.bot = bot\n        self.interaction = interaction\n\n        self.command: ApplicationCommand = None  # type: ignore\n        self.focused: Option = None  # type: ignore\n        self.value: str = None  # type: ignore\n        self.options: dict = None  # type: ignore\n\n    @property\n    def cog(self) -> Optional[Cog]:\n        \"\"\"Optional[:class:`.Cog`]: Returns the cog associated with this context's command. ``None`` if it does not exist.\"\"\"\n        if self.command is None:\n            return None\n       \n        return self.command.cog\n", "path": "discord/commands/context.py"}], "after_files": [{"content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-2021 Rapptz\nCopyright (c) 2021-present Pycord Development\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\nfrom __future__ import annotations\n\nfrom typing import TYPE_CHECKING, Optional, Union\n\nimport discord.abc\n\nif TYPE_CHECKING:\n    import discord\n    from discord import Bot\n    from discord.state import ConnectionState\n\n    from .commands import ApplicationCommand, Option\n    from ..cog import Cog\n\nfrom ..guild import Guild\nfrom ..interactions import Interaction, InteractionResponse\nfrom ..member import Member\nfrom ..message import Message\nfrom ..user import User\nfrom ..utils import cached_property\n\n__all__ = (\n    \"ApplicationContext\",\n    \"AutocompleteContext\"\n)\n\nclass ApplicationContext(discord.abc.Messageable):\n    \"\"\"Represents a Discord application command interaction context.\n\n    This class is not created manually and is instead passed to application\n    commands as the first parameter.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    bot: :class:`.Bot`\n        The bot that the command belongs to.\n    interaction: :class:`.Interaction`\n        The interaction object that invoked the command.\n    command: :class:`.ApplicationCommand`\n        The command that this context belongs to.\n    \"\"\"\n\n    def __init__(self, bot: Bot, interaction: Interaction):\n        self.bot = bot\n        self.interaction = interaction\n\n        # below attributes will be set after initialization\n        self.command: ApplicationCommand = None  # type: ignore\n        self.focused: Option = None  # type: ignore\n        self.value: str = None  # type: ignore\n        self.options: dict = None  # type: ignore\n\n        self._state: ConnectionState = self.interaction._state\n\n    async def _get_channel(self) -> discord.abc.Messageable:\n        return self.channel\n\n    @cached_property\n    def channel(self):\n        return self.interaction.channel\n\n    @cached_property\n    def channel_id(self) -> Optional[int]:\n        return self.interaction.channel_id\n\n    @cached_property\n    def guild(self) -> Optional[Guild]:\n        return self.interaction.guild\n\n    @cached_property\n    def guild_id(self) -> Optional[int]:\n        return self.interaction.guild_id\n\n    @cached_property\n    def locale(self) -> Optional[str]:\n        return self.interaction.locale\n\n    @cached_property\n    def guild_locale(self) -> Optional[str]:\n        return self.interaction.guild_locale\n\n    @cached_property\n    def me(self) -> Union[Member, User]:\n        return self.guild.me if self.guild is not None else self.bot.user\n\n    @cached_property\n    def message(self) -> Optional[Message]:\n        return self.interaction.message\n\n    @cached_property\n    def user(self) -> Optional[Union[Member, User]]:\n        return self.interaction.user\n\n    @cached_property\n    def author(self) -> Optional[Union[Member, User]]:\n        return self.user\n\n    @property\n    def voice_client(self):\n        if self.guild is None:\n            return None\n        \n        return self.guild.voice_client\n\n    @cached_property\n    def response(self) -> InteractionResponse:\n        return self.interaction.response\n\n    @property\n    def respond(self):\n        if not self.response.is_done():\n            return self.interaction.response.send_message\n        else:\n            raise RuntimeError(f\"Interaction was already issued a response. Try using {type(self).__name__}.send_followup() instead.\")\n\n    @property\n    async def send_response(self) -> Callable[..., Union[Interaction, Webhook]]:\n        \"\"\"Callable[..., Union[:class:`~.Interaction`, :class:`~.Webhook`]]: Sends either a response\n        or a followup response depending if the interaction has been responded to yet or not.\"\"\"\n        if not self.response.is_done():\n            return self.interaction.response.send_message  # self.response\n        else:\n            return self.followup.send  # self.send_followup\n\n    @property\n    def send_followup(self):\n        if self.response.is_done():\n            return self.followup.send\n        else:\n            raise RuntimeError(f\"Interaction was not yet issued a response. Try using {type(self).__name__}.respond() first.\")\n\n    @property\n    def defer(self):\n        return self.interaction.response.defer\n\n    @property\n    def followup(self):\n        return self.interaction.followup\n\n    async def delete(self):\n        \"\"\"Calls :attr:`~discord.commands.ApplicationContext.respond`.\n        If the response is done, then calls :attr:`~discord.commands.ApplicationContext.respond` first.\"\"\"\n        if not self.response.is_done():\n            await self.defer()\n\n        return await self.interaction.delete_original_message()\n\n    @property\n    def edit(self):\n        return self.interaction.edit_original_message\n\n    @property\n    def cog(self) -> Optional[Cog]:\n        \"\"\"Optional[:class:`.Cog`]: Returns the cog associated with this context's command. ``None`` if it does not exist.\"\"\"\n        if self.command is None:\n            return None\n       \n        return self.command.cog\n\n\nclass AutocompleteContext:\n    \"\"\"Represents context for a slash command's option autocomplete.\n\n    This class is not created manually and is instead passed to an Option's autocomplete callback.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    bot: :class:`.Bot`\n        The bot that the command belongs to.    \n    interaction: :class:`.Interaction`\n        The interaction object that invoked the autocomplete.\n    command: :class:`.ApplicationCommand`\n        The command that this context belongs to.\n    focused: :class:`.Option`\n        The option the user is currently typing.\n    value: :class:`.str`\n        The content of the focused option.\n    options :class:`.dict`\n        A name to value mapping of the options that the user has selected before this option.\n    \"\"\"\n\n    __slots__ = (\"bot\", \"interaction\", \"command\", \"focused\", \"value\", \"options\")\n    \n    def __init__(self, bot: Bot, interaction: Interaction) -> None:\n        self.bot = bot\n        self.interaction = interaction\n\n        self.command: ApplicationCommand = None  # type: ignore\n        self.focused: Option = None  # type: ignore\n        self.value: str = None  # type: ignore\n        self.options: dict = None  # type: ignore\n\n    @property\n    def cog(self) -> Optional[Cog]:\n        \"\"\"Optional[:class:`.Cog`]: Returns the cog associated with this context's command. ``None`` if it does not exist.\"\"\"\n        if self.command is None:\n            return None\n       \n        return self.command.cog\n", "path": "discord/commands/context.py"}]}