We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Ephemeral (hidden) Messages now support embeds
Whenever an embed is sent with the `hidden=True`, a warning is printed : `Embed/File is not supported for hidden!`. But ephemeral messages now support embeds.

--- 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_slash/context.py`
Content:
```
1 import typing
2 import asyncio
3 from warnings import warn
4 
5 import discord
6 from contextlib import suppress
7 from discord.ext import commands
8 from . import http
9 from . import error
10 from . import model
11 
12 
13 class SlashContext:
14     """
15     Context of the slash command.\n
16     Kinda similar with discord.ext.commands.Context.
17 
18     .. warning::
19         Do not manually init this model.
20 
21     :ivar message: Message that invoked the slash command.
22     :ivar name: Name of the command.
23     :ivar args: List of processed arguments invoked with the command.
24     :ivar kwargs: Dictionary of processed arguments invoked with the command.
25     :ivar subcommand_name: Subcommand of the command.
26     :ivar subcommand_group: Subcommand group of the command.
27     :ivar interaction_id: Interaction ID of the command message.
28     :ivar command_id: ID of the command.
29     :ivar bot: discord.py client.
30     :ivar _http: :class:`.http.SlashCommandRequest` of the client.
31     :ivar _logger: Logger instance.
32     :ivar deferred: Whether the command is current deferred (loading state)
33     :ivar _deferred_hidden: Internal var to check that state stays the same
34     :ivar responded: Whether you have responded with a message to the interaction.
35     :ivar guild_id: Guild ID of the command message. If the command was invoked in DM, then it is ``None``
36     :ivar author_id: User ID representing author of the command message.
37     :ivar channel_id: Channel ID representing channel of the command message.
38     :ivar author: User or Member instance of the command invoke.
39     """
40 
41     def __init__(self,
42                  _http: http.SlashCommandRequest,
43                  _json: dict,
44                  _discord: typing.Union[discord.Client, commands.Bot],
45                  logger):
46         self.__token = _json["token"]
47         self.message = None  # Should be set later.
48         self.name = self.command = self.invoked_with = _json["data"]["name"]
49         self.args = []
50         self.kwargs = {}
51         self.subcommand_name = self.invoked_subcommand = self.subcommand_passed = None
52         self.subcommand_group = self.invoked_subcommand_group = self.subcommand_group_passed = None
53         self.interaction_id = _json["id"]
54         self.command_id = _json["data"]["id"]
55         self._http = _http
56         self.bot = _discord
57         self._logger = logger
58         self.deferred = False
59         self.responded = False
60         self._deferred_hidden = False  # To check if the patch to the deferred response matches
61         self.guild_id = int(_json["guild_id"]) if "guild_id" in _json.keys() else None
62         self.author_id = int(_json["member"]["user"]["id"] if "member" in _json.keys() else _json["user"]["id"])
63         self.channel_id = int(_json["channel_id"])
64         if self.guild:
65             self.author = discord.Member(data=_json["member"], state=self.bot._connection, guild=self.guild)
66         elif self.guild_id:
67             self.author = discord.User(data=_json["member"]["user"], state=self.bot._connection)
68         else:
69             self.author = discord.User(data=_json["user"], state=self.bot._connection)
70 
71     @property
72     def _deffered_hidden(self):
73         warn("`_deffered_hidden` as been renamed to `_deferred_hidden`.", DeprecationWarning, stacklevel=2)
74         return self._deferred_hidden
75 
76     @_deffered_hidden.setter
77     def _deffered_hidden(self, value):
78         warn("`_deffered_hidden` as been renamed to `_deferred_hidden`.", DeprecationWarning, stacklevel=2)
79         self._deferred_hidden = value
80 
81     @property
82     def deffered(self):
83         warn("`deffered` as been renamed to `deferred`.", DeprecationWarning, stacklevel=2)
84         return self.deferred
85 
86     @deffered.setter
87     def deffered(self, value):
88         warn("`deffered` as been renamed to `deferred`.", DeprecationWarning, stacklevel=2)
89         self.deferred = value
90 
91     @property
92     def guild(self) -> typing.Optional[discord.Guild]:
93         """
94         Guild instance of the command invoke. If the command was invoked in DM, then it is ``None``
95 
96         :return: Optional[discord.Guild]
97         """
98         return self.bot.get_guild(self.guild_id) if self.guild_id else None
99 
100     @property
101     def channel(self) -> typing.Optional[typing.Union[discord.TextChannel, discord.DMChannel]]:
102         """
103         Channel instance of the command invoke.
104 
105         :return: Optional[Union[discord.abc.GuildChannel, discord.abc.PrivateChannel]]
106         """
107         return self.bot.get_channel(self.channel_id)
108 
109     async def defer(self, hidden: bool = False):
110         """
111         'Defers' the response, showing a loading state to the user
112 
113         :param hidden: Whether the deferred response should be ephemeral . Default ``False``.
114         """
115         if self.deferred or self.responded:
116             raise error.AlreadyResponded("You have already responded to this command!")
117         base = {"type": 5}
118         if hidden:
119             base["data"] = {"flags": 64}
120             self._deferred_hidden = True
121         await self._http.post_initial_response(base, self.interaction_id, self.__token)
122         self.deferred = True
123 
124     async def send(self,
125                    content: str = "", *,
126                    embed: discord.Embed = None,
127                    embeds: typing.List[discord.Embed] = None,
128                    tts: bool = False,
129                    file: discord.File = None,
130                    files: typing.List[discord.File] = None,
131                    allowed_mentions: discord.AllowedMentions = None,
132                    hidden: bool = False,
133                    delete_after: float = None) -> model.SlashMessage:
134         """
135         Sends response of the slash command.
136 
137         .. note::
138             - Param ``hidden`` doesn't support embed and file.
139 
140         .. warning::
141             - Since Release 1.0.9, this is completely changed. If you are migrating from older version, please make sure to fix the usage.
142             - You can't use both ``embed`` and ``embeds`` at the same time, also applies to ``file`` and ``files``.
143             - If you send files in the initial response, this will defer if it's not been deferred, and then PATCH with the message
144 
145         :param content:  Content of the response.
146         :type content: str
147         :param embed: Embed of the response.
148         :type embed: discord.Embed
149         :param embeds: Embeds of the response. Maximum 10.
150         :type embeds: List[discord.Embed]
151         :param tts: Whether to speak message using tts. Default ``False``.
152         :type tts: bool
153         :param file: File to send.
154         :type file: discord.File
155         :param files: Files to send.
156         :type files: List[discord.File]
157         :param allowed_mentions: AllowedMentions of the message.
158         :type allowed_mentions: discord.AllowedMentions
159         :param hidden: Whether the message is hidden, which means message content will only be seen to the author.
160         :type hidden: bool
161         :param delete_after: If provided, the number of seconds to wait in the background before deleting the message we just sent. If the deletion fails, then it is silently ignored.
162         :type delete_after: float
163         :return: Union[discord.Message, dict]
164         """
165         if embed and embeds:
166             raise error.IncorrectFormat("You can't use both `embed` and `embeds`!")
167         if embed:
168             embeds = [embed]
169         if embeds:
170             if not isinstance(embeds, list):
171                 raise error.IncorrectFormat("Provide a list of embeds.")
172             elif len(embeds) > 10:
173                 raise error.IncorrectFormat("Do not provide more than 10 embeds.")
174         if file and files:
175             raise error.IncorrectFormat("You can't use both `file` and `files`!")
176         if file:
177             files = [file]
178         if delete_after and hidden:
179             raise error.IncorrectFormat("You can't delete a hidden message!")
180 
181         base = {
182             "content": content,
183             "tts": tts,
184             "embeds": [x.to_dict() for x in embeds] if embeds else [],
185             "allowed_mentions": allowed_mentions.to_dict() if allowed_mentions
186             else self.bot.allowed_mentions.to_dict() if self.bot.allowed_mentions else {}
187         }
188         if hidden:
189             if embeds or files:
190                 self._logger.warning("Embed/File is not supported for `hidden`!")
191             base["flags"] = 64
192 
193         initial_message = False
194         if not self.responded:
195             initial_message = True
196             if files and not self.deferred:
197                 await self.defer(hidden=hidden)
198             if self.deferred:
199                 if self._deferred_hidden != hidden:
200                     self._logger.warning(
201                         "Deferred response might not be what you set it to! (hidden / visible) "
202                         "This is because it was deferred in a different state."
203                     )
204                 resp = await self._http.edit(base, self.__token, files=files)
205                 self.deferred = False
206             else:
207                 json_data = {
208                     "type": 4,
209                     "data": base
210                 }
211                 await self._http.post_initial_response(json_data, self.interaction_id, self.__token)
212                 if not hidden:
213                     resp = await self._http.edit({}, self.__token)
214                 else:
215                     resp = {}
216             self.responded = True
217         else:
218             resp = await self._http.post_followup(base, self.__token, files=files)
219         if files:
220             for file in files:
221                 file.close()
222         if not hidden:
223             smsg = model.SlashMessage(state=self.bot._connection,
224                                       data=resp,
225                                       channel=self.channel or discord.Object(id=self.channel_id),
226                                       _http=self._http,
227                                       interaction_token=self.__token)
228             if delete_after:
229                 self.bot.loop.create_task(smsg.delete(delay=delete_after))
230             if initial_message:
231                 self.message = smsg
232             return smsg
233         else:
234             return resp
235
```
--- 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_slash/context.py b/discord_slash/context.py
--- a/discord_slash/context.py
+++ b/discord_slash/context.py
@@ -134,9 +134,6 @@
         """
         Sends response of the slash command.
 
-        .. note::
-            - Param ``hidden`` doesn't support embed and file.
-
         .. warning::
             - Since Release 1.0.9, this is completely changed. If you are migrating from older version, please make sure to fix the usage.
             - You can't use both ``embed`` and ``embeds`` at the same time, also applies to ``file`` and ``files``.
@@ -186,8 +183,6 @@
             else self.bot.allowed_mentions.to_dict() if self.bot.allowed_mentions else {}
         }
         if hidden:
-            if embeds or files:
-                self._logger.warning("Embed/File is not supported for `hidden`!")
             base["flags"] = 64
 
         initial_message = False

{"golden_diff": "diff --git a/discord_slash/context.py b/discord_slash/context.py\n--- a/discord_slash/context.py\n+++ b/discord_slash/context.py\n@@ -134,9 +134,6 @@\n         \"\"\"\n         Sends response of the slash command.\n \n-        .. note::\n-            - Param ``hidden`` doesn't support embed and file.\n-\n         .. warning::\n             - Since Release 1.0.9, this is completely changed. If you are migrating from older version, please make sure to fix the usage.\n             - You can't use both ``embed`` and ``embeds`` at the same time, also applies to ``file`` and ``files``.\n@@ -186,8 +183,6 @@\n             else self.bot.allowed_mentions.to_dict() if self.bot.allowed_mentions else {}\n         }\n         if hidden:\n-            if embeds or files:\n-                self._logger.warning(\"Embed/File is not supported for `hidden`!\")\n             base[\"flags\"] = 64\n \n         initial_message = False\n", "issue": "Ephemeral (hidden) Messages now support embeds\nWhenever an embed is sent with the `hidden=True`, a warning is printed : `Embed/File is not supported for hidden!`. But ephemeral messages now support embeds.\n", "before_files": [{"content": "import typing\nimport asyncio\nfrom warnings import warn\n\nimport discord\nfrom contextlib import suppress\nfrom discord.ext import commands\nfrom . import http\nfrom . import error\nfrom . import model\n\n\nclass SlashContext:\n    \"\"\"\n    Context of the slash command.\\n\n    Kinda similar with discord.ext.commands.Context.\n\n    .. warning::\n        Do not manually init this model.\n\n    :ivar message: Message that invoked the slash command.\n    :ivar name: Name of the command.\n    :ivar args: List of processed arguments invoked with the command.\n    :ivar kwargs: Dictionary of processed arguments invoked with the command.\n    :ivar subcommand_name: Subcommand of the command.\n    :ivar subcommand_group: Subcommand group of the command.\n    :ivar interaction_id: Interaction ID of the command message.\n    :ivar command_id: ID of the command.\n    :ivar bot: discord.py client.\n    :ivar _http: :class:`.http.SlashCommandRequest` of the client.\n    :ivar _logger: Logger instance.\n    :ivar deferred: Whether the command is current deferred (loading state)\n    :ivar _deferred_hidden: Internal var to check that state stays the same\n    :ivar responded: Whether you have responded with a message to the interaction.\n    :ivar guild_id: Guild ID of the command message. If the command was invoked in DM, then it is ``None``\n    :ivar author_id: User ID representing author of the command message.\n    :ivar channel_id: Channel ID representing channel of the command message.\n    :ivar author: User or Member instance of the command invoke.\n    \"\"\"\n\n    def __init__(self,\n                 _http: http.SlashCommandRequest,\n                 _json: dict,\n                 _discord: typing.Union[discord.Client, commands.Bot],\n                 logger):\n        self.__token = _json[\"token\"]\n        self.message = None  # Should be set later.\n        self.name = self.command = self.invoked_with = _json[\"data\"][\"name\"]\n        self.args = []\n        self.kwargs = {}\n        self.subcommand_name = self.invoked_subcommand = self.subcommand_passed = None\n        self.subcommand_group = self.invoked_subcommand_group = self.subcommand_group_passed = None\n        self.interaction_id = _json[\"id\"]\n        self.command_id = _json[\"data\"][\"id\"]\n        self._http = _http\n        self.bot = _discord\n        self._logger = logger\n        self.deferred = False\n        self.responded = False\n        self._deferred_hidden = False  # To check if the patch to the deferred response matches\n        self.guild_id = int(_json[\"guild_id\"]) if \"guild_id\" in _json.keys() else None\n        self.author_id = int(_json[\"member\"][\"user\"][\"id\"] if \"member\" in _json.keys() else _json[\"user\"][\"id\"])\n        self.channel_id = int(_json[\"channel_id\"])\n        if self.guild:\n            self.author = discord.Member(data=_json[\"member\"], state=self.bot._connection, guild=self.guild)\n        elif self.guild_id:\n            self.author = discord.User(data=_json[\"member\"][\"user\"], state=self.bot._connection)\n        else:\n            self.author = discord.User(data=_json[\"user\"], state=self.bot._connection)\n\n    @property\n    def _deffered_hidden(self):\n        warn(\"`_deffered_hidden` as been renamed to `_deferred_hidden`.\", DeprecationWarning, stacklevel=2)\n        return self._deferred_hidden\n\n    @_deffered_hidden.setter\n    def _deffered_hidden(self, value):\n        warn(\"`_deffered_hidden` as been renamed to `_deferred_hidden`.\", DeprecationWarning, stacklevel=2)\n        self._deferred_hidden = value\n\n    @property\n    def deffered(self):\n        warn(\"`deffered` as been renamed to `deferred`.\", DeprecationWarning, stacklevel=2)\n        return self.deferred\n\n    @deffered.setter\n    def deffered(self, value):\n        warn(\"`deffered` as been renamed to `deferred`.\", DeprecationWarning, stacklevel=2)\n        self.deferred = value\n\n    @property\n    def guild(self) -> typing.Optional[discord.Guild]:\n        \"\"\"\n        Guild instance of the command invoke. If the command was invoked in DM, then it is ``None``\n\n        :return: Optional[discord.Guild]\n        \"\"\"\n        return self.bot.get_guild(self.guild_id) if self.guild_id else None\n\n    @property\n    def channel(self) -> typing.Optional[typing.Union[discord.TextChannel, discord.DMChannel]]:\n        \"\"\"\n        Channel instance of the command invoke.\n\n        :return: Optional[Union[discord.abc.GuildChannel, discord.abc.PrivateChannel]]\n        \"\"\"\n        return self.bot.get_channel(self.channel_id)\n\n    async def defer(self, hidden: bool = False):\n        \"\"\"\n        'Defers' the response, showing a loading state to the user\n\n        :param hidden: Whether the deferred response should be ephemeral . Default ``False``.\n        \"\"\"\n        if self.deferred or self.responded:\n            raise error.AlreadyResponded(\"You have already responded to this command!\")\n        base = {\"type\": 5}\n        if hidden:\n            base[\"data\"] = {\"flags\": 64}\n            self._deferred_hidden = True\n        await self._http.post_initial_response(base, self.interaction_id, self.__token)\n        self.deferred = True\n\n    async def send(self,\n                   content: str = \"\", *,\n                   embed: discord.Embed = None,\n                   embeds: typing.List[discord.Embed] = None,\n                   tts: bool = False,\n                   file: discord.File = None,\n                   files: typing.List[discord.File] = None,\n                   allowed_mentions: discord.AllowedMentions = None,\n                   hidden: bool = False,\n                   delete_after: float = None) -> model.SlashMessage:\n        \"\"\"\n        Sends response of the slash command.\n\n        .. note::\n            - Param ``hidden`` doesn't support embed and file.\n\n        .. warning::\n            - Since Release 1.0.9, this is completely changed. If you are migrating from older version, please make sure to fix the usage.\n            - You can't use both ``embed`` and ``embeds`` at the same time, also applies to ``file`` and ``files``.\n            - If you send files in the initial response, this will defer if it's not been deferred, and then PATCH with the message\n\n        :param content:  Content of the response.\n        :type content: str\n        :param embed: Embed of the response.\n        :type embed: discord.Embed\n        :param embeds: Embeds of the response. Maximum 10.\n        :type embeds: List[discord.Embed]\n        :param tts: Whether to speak message using tts. Default ``False``.\n        :type tts: bool\n        :param file: File to send.\n        :type file: discord.File\n        :param files: Files to send.\n        :type files: List[discord.File]\n        :param allowed_mentions: AllowedMentions of the message.\n        :type allowed_mentions: discord.AllowedMentions\n        :param hidden: Whether the message is hidden, which means message content will only be seen to the author.\n        :type hidden: bool\n        :param delete_after: If provided, the number of seconds to wait in the background before deleting the message we just sent. If the deletion fails, then it is silently ignored.\n        :type delete_after: float\n        :return: Union[discord.Message, dict]\n        \"\"\"\n        if embed and embeds:\n            raise error.IncorrectFormat(\"You can't use both `embed` and `embeds`!\")\n        if embed:\n            embeds = [embed]\n        if embeds:\n            if not isinstance(embeds, list):\n                raise error.IncorrectFormat(\"Provide a list of embeds.\")\n            elif len(embeds) > 10:\n                raise error.IncorrectFormat(\"Do not provide more than 10 embeds.\")\n        if file and files:\n            raise error.IncorrectFormat(\"You can't use both `file` and `files`!\")\n        if file:\n            files = [file]\n        if delete_after and hidden:\n            raise error.IncorrectFormat(\"You can't delete a hidden message!\")\n\n        base = {\n            \"content\": content,\n            \"tts\": tts,\n            \"embeds\": [x.to_dict() for x in embeds] if embeds else [],\n            \"allowed_mentions\": allowed_mentions.to_dict() if allowed_mentions\n            else self.bot.allowed_mentions.to_dict() if self.bot.allowed_mentions else {}\n        }\n        if hidden:\n            if embeds or files:\n                self._logger.warning(\"Embed/File is not supported for `hidden`!\")\n            base[\"flags\"] = 64\n\n        initial_message = False\n        if not self.responded:\n            initial_message = True\n            if files and not self.deferred:\n                await self.defer(hidden=hidden)\n            if self.deferred:\n                if self._deferred_hidden != hidden:\n                    self._logger.warning(\n                        \"Deferred response might not be what you set it to! (hidden / visible) \"\n                        \"This is because it was deferred in a different state.\"\n                    )\n                resp = await self._http.edit(base, self.__token, files=files)\n                self.deferred = False\n            else:\n                json_data = {\n                    \"type\": 4,\n                    \"data\": base\n                }\n                await self._http.post_initial_response(json_data, self.interaction_id, self.__token)\n                if not hidden:\n                    resp = await self._http.edit({}, self.__token)\n                else:\n                    resp = {}\n            self.responded = True\n        else:\n            resp = await self._http.post_followup(base, self.__token, files=files)\n        if files:\n            for file in files:\n                file.close()\n        if not hidden:\n            smsg = model.SlashMessage(state=self.bot._connection,\n                                      data=resp,\n                                      channel=self.channel or discord.Object(id=self.channel_id),\n                                      _http=self._http,\n                                      interaction_token=self.__token)\n            if delete_after:\n                self.bot.loop.create_task(smsg.delete(delay=delete_after))\n            if initial_message:\n                self.message = smsg\n            return smsg\n        else:\n            return resp\n", "path": "discord_slash/context.py"}], "after_files": [{"content": "import typing\nimport asyncio\nfrom warnings import warn\n\nimport discord\nfrom contextlib import suppress\nfrom discord.ext import commands\nfrom . import http\nfrom . import error\nfrom . import model\n\n\nclass SlashContext:\n    \"\"\"\n    Context of the slash command.\\n\n    Kinda similar with discord.ext.commands.Context.\n\n    .. warning::\n        Do not manually init this model.\n\n    :ivar message: Message that invoked the slash command.\n    :ivar name: Name of the command.\n    :ivar args: List of processed arguments invoked with the command.\n    :ivar kwargs: Dictionary of processed arguments invoked with the command.\n    :ivar subcommand_name: Subcommand of the command.\n    :ivar subcommand_group: Subcommand group of the command.\n    :ivar interaction_id: Interaction ID of the command message.\n    :ivar command_id: ID of the command.\n    :ivar bot: discord.py client.\n    :ivar _http: :class:`.http.SlashCommandRequest` of the client.\n    :ivar _logger: Logger instance.\n    :ivar deferred: Whether the command is current deferred (loading state)\n    :ivar _deferred_hidden: Internal var to check that state stays the same\n    :ivar responded: Whether you have responded with a message to the interaction.\n    :ivar guild_id: Guild ID of the command message. If the command was invoked in DM, then it is ``None``\n    :ivar author_id: User ID representing author of the command message.\n    :ivar channel_id: Channel ID representing channel of the command message.\n    :ivar author: User or Member instance of the command invoke.\n    \"\"\"\n\n    def __init__(self,\n                 _http: http.SlashCommandRequest,\n                 _json: dict,\n                 _discord: typing.Union[discord.Client, commands.Bot],\n                 logger):\n        self.__token = _json[\"token\"]\n        self.message = None  # Should be set later.\n        self.name = self.command = self.invoked_with = _json[\"data\"][\"name\"]\n        self.args = []\n        self.kwargs = {}\n        self.subcommand_name = self.invoked_subcommand = self.subcommand_passed = None\n        self.subcommand_group = self.invoked_subcommand_group = self.subcommand_group_passed = None\n        self.interaction_id = _json[\"id\"]\n        self.command_id = _json[\"data\"][\"id\"]\n        self._http = _http\n        self.bot = _discord\n        self._logger = logger\n        self.deferred = False\n        self.responded = False\n        self._deferred_hidden = False  # To check if the patch to the deferred response matches\n        self.guild_id = int(_json[\"guild_id\"]) if \"guild_id\" in _json.keys() else None\n        self.author_id = int(_json[\"member\"][\"user\"][\"id\"] if \"member\" in _json.keys() else _json[\"user\"][\"id\"])\n        self.channel_id = int(_json[\"channel_id\"])\n        if self.guild:\n            self.author = discord.Member(data=_json[\"member\"], state=self.bot._connection, guild=self.guild)\n        elif self.guild_id:\n            self.author = discord.User(data=_json[\"member\"][\"user\"], state=self.bot._connection)\n        else:\n            self.author = discord.User(data=_json[\"user\"], state=self.bot._connection)\n\n    @property\n    def _deffered_hidden(self):\n        warn(\"`_deffered_hidden` as been renamed to `_deferred_hidden`.\", DeprecationWarning, stacklevel=2)\n        return self._deferred_hidden\n\n    @_deffered_hidden.setter\n    def _deffered_hidden(self, value):\n        warn(\"`_deffered_hidden` as been renamed to `_deferred_hidden`.\", DeprecationWarning, stacklevel=2)\n        self._deferred_hidden = value\n\n    @property\n    def deffered(self):\n        warn(\"`deffered` as been renamed to `deferred`.\", DeprecationWarning, stacklevel=2)\n        return self.deferred\n\n    @deffered.setter\n    def deffered(self, value):\n        warn(\"`deffered` as been renamed to `deferred`.\", DeprecationWarning, stacklevel=2)\n        self.deferred = value\n\n    @property\n    def guild(self) -> typing.Optional[discord.Guild]:\n        \"\"\"\n        Guild instance of the command invoke. If the command was invoked in DM, then it is ``None``\n\n        :return: Optional[discord.Guild]\n        \"\"\"\n        return self.bot.get_guild(self.guild_id) if self.guild_id else None\n\n    @property\n    def channel(self) -> typing.Optional[typing.Union[discord.TextChannel, discord.DMChannel]]:\n        \"\"\"\n        Channel instance of the command invoke.\n\n        :return: Optional[Union[discord.abc.GuildChannel, discord.abc.PrivateChannel]]\n        \"\"\"\n        return self.bot.get_channel(self.channel_id)\n\n    async def defer(self, hidden: bool = False):\n        \"\"\"\n        'Defers' the response, showing a loading state to the user\n\n        :param hidden: Whether the deferred response should be ephemeral . Default ``False``.\n        \"\"\"\n        if self.deferred or self.responded:\n            raise error.AlreadyResponded(\"You have already responded to this command!\")\n        base = {\"type\": 5}\n        if hidden:\n            base[\"data\"] = {\"flags\": 64}\n            self._deferred_hidden = True\n        await self._http.post_initial_response(base, self.interaction_id, self.__token)\n        self.deferred = True\n\n    async def send(self,\n                   content: str = \"\", *,\n                   embed: discord.Embed = None,\n                   embeds: typing.List[discord.Embed] = None,\n                   tts: bool = False,\n                   file: discord.File = None,\n                   files: typing.List[discord.File] = None,\n                   allowed_mentions: discord.AllowedMentions = None,\n                   hidden: bool = False,\n                   delete_after: float = None) -> model.SlashMessage:\n        \"\"\"\n        Sends response of the slash command.\n\n        .. warning::\n            - Since Release 1.0.9, this is completely changed. If you are migrating from older version, please make sure to fix the usage.\n            - You can't use both ``embed`` and ``embeds`` at the same time, also applies to ``file`` and ``files``.\n            - If you send files in the initial response, this will defer if it's not been deferred, and then PATCH with the message\n\n        :param content:  Content of the response.\n        :type content: str\n        :param embed: Embed of the response.\n        :type embed: discord.Embed\n        :param embeds: Embeds of the response. Maximum 10.\n        :type embeds: List[discord.Embed]\n        :param tts: Whether to speak message using tts. Default ``False``.\n        :type tts: bool\n        :param file: File to send.\n        :type file: discord.File\n        :param files: Files to send.\n        :type files: List[discord.File]\n        :param allowed_mentions: AllowedMentions of the message.\n        :type allowed_mentions: discord.AllowedMentions\n        :param hidden: Whether the message is hidden, which means message content will only be seen to the author.\n        :type hidden: bool\n        :param delete_after: If provided, the number of seconds to wait in the background before deleting the message we just sent. If the deletion fails, then it is silently ignored.\n        :type delete_after: float\n        :return: Union[discord.Message, dict]\n        \"\"\"\n        if embed and embeds:\n            raise error.IncorrectFormat(\"You can't use both `embed` and `embeds`!\")\n        if embed:\n            embeds = [embed]\n        if embeds:\n            if not isinstance(embeds, list):\n                raise error.IncorrectFormat(\"Provide a list of embeds.\")\n            elif len(embeds) > 10:\n                raise error.IncorrectFormat(\"Do not provide more than 10 embeds.\")\n        if file and files:\n            raise error.IncorrectFormat(\"You can't use both `file` and `files`!\")\n        if file:\n            files = [file]\n        if delete_after and hidden:\n            raise error.IncorrectFormat(\"You can't delete a hidden message!\")\n\n        base = {\n            \"content\": content,\n            \"tts\": tts,\n            \"embeds\": [x.to_dict() for x in embeds] if embeds else [],\n            \"allowed_mentions\": allowed_mentions.to_dict() if allowed_mentions\n            else self.bot.allowed_mentions.to_dict() if self.bot.allowed_mentions else {}\n        }\n        if hidden:\n            base[\"flags\"] = 64\n\n        initial_message = False\n        if not self.responded:\n            initial_message = True\n            if files and not self.deferred:\n                await self.defer(hidden=hidden)\n            if self.deferred:\n                if self._deferred_hidden != hidden:\n                    self._logger.warning(\n                        \"Deferred response might not be what you set it to! (hidden / visible) \"\n                        \"This is because it was deferred in a different state.\"\n                    )\n                resp = await self._http.edit(base, self.__token, files=files)\n                self.deferred = False\n            else:\n                json_data = {\n                    \"type\": 4,\n                    \"data\": base\n                }\n                await self._http.post_initial_response(json_data, self.interaction_id, self.__token)\n                if not hidden:\n                    resp = await self._http.edit({}, self.__token)\n                else:\n                    resp = {}\n            self.responded = True\n        else:\n            resp = await self._http.post_followup(base, self.__token, files=files)\n        if files:\n            for file in files:\n                file.close()\n        if not hidden:\n            smsg = model.SlashMessage(state=self.bot._connection,\n                                      data=resp,\n                                      channel=self.channel or discord.Object(id=self.channel_id),\n                                      _http=self._http,\n                                      interaction_token=self.__token)\n            if delete_after:\n                self.bot.loop.create_task(smsg.delete(delay=delete_after))\n            if initial_message:\n                self.message = smsg\n            return smsg\n        else:\n            return resp\n", "path": "discord_slash/context.py"}]}