Fix thaw report posting to use channel ID instead of nonexistent channel names
The Saturday thaw report was silently failing because it searched for channels named 'bot-admin', 'admin', or 'bot-logs' which don't exist. Now uses a configurable channel ID (overridable via THAW_REPORT_CHANNEL_ID). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
8a4c6e459d
commit
23d8129b80
@ -72,6 +72,9 @@ class BotConfig(BaseSettings):
|
||||
help_editor_role_name: str = "Help Editor"
|
||||
sba_players_role_name: str = "Season 13 Players"
|
||||
|
||||
# Channel IDs
|
||||
thaw_report_channel_id: int = 1354134347598266430
|
||||
|
||||
# Channel Names
|
||||
sba_network_news_channel: str = "sba-network-news"
|
||||
|
||||
|
||||
@ -984,15 +984,9 @@ class TransactionFreezeTask:
|
||||
self.logger.warning("Could not find guild for thaw report")
|
||||
return
|
||||
|
||||
# Try to find admin channel (admin, bot-admin, or bot-logs)
|
||||
admin_channel = None
|
||||
for channel_name in ['bot-admin', 'admin', 'bot-logs']:
|
||||
admin_channel = discord.utils.get(guild.text_channels, name=channel_name)
|
||||
if admin_channel:
|
||||
break
|
||||
|
||||
admin_channel = self.bot.get_channel(config.thaw_report_channel_id)
|
||||
if not admin_channel:
|
||||
self.logger.warning("Could not find admin channel for thaw report")
|
||||
self.logger.warning("Could not find thaw report channel", channel_id=config.thaw_report_channel_id)
|
||||
return
|
||||
|
||||
# Build the report content
|
||||
|
||||
Loading…
Reference in New Issue
Block a user