Skip to content

Commit cdba57d

Browse files
fix: editing_origin not working properly (#1295)
* Update context.py * ci: correct from checks. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 0817ea7 commit cdba57d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

interactions/api/voice/opus.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import array
22
import ctypes
33
import ctypes.util
4-
import os
54
import sys
65
from enum import IntEnum
76
from pathlib import Path

interactions/models/discord/file.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ def __exit__(self, exc_type, exc_val, exc_tb) -> None:
5252
if isinstance(self.file, (IOBase, BinaryIO)):
5353
self.file.close()
5454

55+
5556
UPLOADABLE_TYPE = Union[File, IOBase, BinaryIO, Path, str]
5657

5758

interactions/models/internal/context.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ async def edit_origin(
750750

751751
message_data = None
752752
if self.deferred:
753-
if not self.defer_edit_origin:
753+
if not self.editing_origin:
754754
get_logger().warning(
755755
"If you want to edit the original message, and need to defer, you must set the `edit_origin` kwarg to True!"
756756
)
@@ -759,7 +759,7 @@ async def edit_origin(
759759
message_payload, self.client.app.id, self.token
760760
)
761761
self.deferred = False
762-
self.defer_edit_origin = False
762+
self.editing_origin = False
763763
else:
764764
payload = {"type": CallbackType.UPDATE_MESSAGE, "data": message_payload}
765765
await self.client.http.post_initial_response(payload, str(self.id), self.token, files=files or file)

0 commit comments

Comments
 (0)