Skip to content

Commit e8fb2fd

Browse files
committed
Remove finding user id from channel history
1 parent da84ebf commit e8fb2fd

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

core/thread.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -176,14 +176,16 @@ async def _find_from_channel(self, channel):
176176

177177
if channel.topic and 'User ID: ' in channel.topic:
178178
user_id = int(re.findall(r'\d+', channel.topic)[0])
179-
elif channel.topic is None:
180-
async for message in channel.history(limit=50):
181-
if message.embeds:
182-
em = message.embeds[0]
183-
matches = re.findall(r'<@(\d+)>', str(em.description))
184-
if matches:
185-
user_id = int(matches[-1])
186-
break
179+
180+
# BUG: This wont work with multiple categories.
181+
# elif channel.topic is None:
182+
# async for message in channel.history(limit=50):
183+
# if message.embeds:
184+
# em = message.embeds[0]
185+
# matches = re.findall(r'<@(\d+)>', str(em.description))
186+
# if matches:
187+
# user_id = int(matches[-1])
188+
# break
187189

188190
if user_id is not None:
189191
if user_id in self.cache:

0 commit comments

Comments
 (0)