MCPcopy Create free account
hub / github.com/pollinations/pollinations / archive_thread

Function archive_thread

apps/polly/src/bot.py:1512–1518  ·  view source on GitHub ↗

Archive thread if applicable.

(channel: discord.Thread | discord.TextChannel)

Source from the content-addressed store, hash-verified

1510
1511
1512async def archive_thread(channel: discord.Thread | discord.TextChannel):
1513 """Archive thread if applicable."""
1514 if isinstance(channel, discord.Thread):
1515 try:
1516 await channel.edit(archived=True)
1517 except discord.HTTPException as e:
1518 logger.warning(f"Failed to archive thread {channel.id}: {e}")

Callers 1

process_messageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected