Skip to content

Commit c3cdd66

Browse files
committed
Mentor Requests: read full channel history
1 parent 89f6f5e commit c3cdd66

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cogs/mentor_requests.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
)
2929
PROM_TASK_QUEUE = prometheus_client.Gauge("mentor_requests_task_queue", "size of the task queue")
3030
PROM_EXERCISM_INTERVAL = prometheus_client.Gauge(
31-
"mentor_requests_exercism_interval", "delay between refreshes", ["track"]
31+
"mentor_request_exercism_interval", "delay between refreshes", ["track"]
3232
)
3333

3434

@@ -203,7 +203,7 @@ async def fetch_discord_thread(self, track: str) -> None:
203203
thread = await self.get_thread(track)
204204
messages = {}
205205
await self.unarchive(thread)
206-
async for message in thread.history():
206+
async for message in thread.history(limit=None):
207207
if message.author != thread.owner:
208208
continue
209209
if message == thread.starter_message:
@@ -278,7 +278,7 @@ async def load_data(self) -> None:
278278
assert isinstance(channel, discord.TextChannel), f"{channel} is not a TextChannel."
279279

280280
self.threads = {}
281-
async for message in channel.history():
281+
async for message in channel.history(limit=None):
282282
if not message.thread:
283283
continue
284284
thread = await message.fetch_thread()

0 commit comments

Comments
 (0)