@@ -735,7 +735,7 @@ async def find(
735
735
) -> Thread :
736
736
"""Finds a thread from cache or from discord channel topics."""
737
737
if recipient is None and channel is not None :
738
- return await self ._find_from_channel (channel )
738
+ return self ._find_from_channel (channel )
739
739
740
740
thread = None
741
741
@@ -761,7 +761,7 @@ async def find(
761
761
thread .ready = True
762
762
return thread
763
763
764
- async def _find_from_channel (self , channel ):
764
+ def _find_from_channel (self , channel ):
765
765
"""
766
766
Tries to find a thread from a channel channel topic,
767
767
if channel topic doesnt exist for some reason, falls back to
@@ -773,23 +773,6 @@ async def _find_from_channel(self, channel):
773
773
if channel .topic :
774
774
user_id = match_user_id (channel .topic )
775
775
776
- # BUG: When discord fails to create channel topic.
777
- # search through message history
778
- elif channel .topic is None :
779
- try :
780
- async for message in channel .history (limit = 100 ):
781
- if message .author != self .bot .user :
782
- continue
783
- if message .embeds :
784
- embed = message .embeds [0 ]
785
- if embed .footer .text :
786
- user_id = match_user_id (embed .footer .text )
787
- if user_id != - 1 :
788
- break
789
- except discord .NotFound :
790
- # When the channel's deleted.
791
- pass
792
-
793
776
if user_id != - 1 :
794
777
if user_id in self .cache :
795
778
return self .cache [user_id ]
0 commit comments