Skip to content

Commit 485ee87

Browse files
authored
fix: self.channel can be None if is DM (#1314)
`self.channel_id` is given at any point but `self.channel` can be `None` if (DM-) channel isn't cached
1 parent 0b8034e commit 485ee87

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

interactions/ext/prefixed_commands/context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def typing(self) -> Typing:
7373
return self.channel.typing
7474

7575
async def _send_http_request(self, message_payload: dict, files: Iterable["UPLOADABLE_TYPE"] | None = None) -> dict:
76-
return await self.client.http.create_message(message_payload, self.channel.id, files=files)
76+
return await self.client.http.create_message(message_payload, self.channel_id, files=files)
7777

7878
async def reply(
7979
self,

0 commit comments

Comments
 (0)