From 6a38f56b4e9585b61a6c578f140c64f10b8b4b89 Mon Sep 17 00:00:00 2001 From: AlbertUnruh <73029826+AlbertUnruh@users.noreply.github.com> Date: Thu, 30 Mar 2023 16:37:35 +0200 Subject: [PATCH] Fix `self.channel` can be `None` if is DM `self.channel_id` is given at any point but `self.channel` can be `None` if (DM-) channel isn't cached --- interactions/ext/prefixed_commands/context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interactions/ext/prefixed_commands/context.py b/interactions/ext/prefixed_commands/context.py index feaf1bb80..1acdd180d 100644 --- a/interactions/ext/prefixed_commands/context.py +++ b/interactions/ext/prefixed_commands/context.py @@ -73,7 +73,7 @@ def typing(self) -> Typing: return self.channel.typing async def _send_http_request(self, message_payload: dict, files: Iterable["UPLOADABLE_TYPE"] | None = None) -> dict: - return await self.client.http.create_message(message_payload, self.channel.id, files=files) + return await self.client.http.create_message(message_payload, self.channel_id, files=files) async def reply( self,