Skip to content

Commit c0ab20a

Browse files
committed
fix(implement:ForumChannels): Fixed crash when post get deleted
1 parent b63ac98 commit c0ab20a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

discord/channel.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1919,6 +1919,9 @@ def __init__(self, *, state, guild, data) -> None:
19191919
def _add_thread(self, thread: ThreadChannel) -> None:
19201920
self._posts[thread.id] = thread
19211921

1922+
def _remove_thread(self, thread: ThreadChannel) -> None:
1923+
self._posts.pop(thread.id, None)
1924+
19221925

19231926
class PartialMessageable(abc.Messageable, Hashable):
19241927
"""Represents a partial messageable to aid with working messageable channels when

0 commit comments

Comments
 (0)