Fix missing guild variable in draft monitor on-clock announcement

Bug: The _post_on_clock_announcement method referenced 'guild' without
defining it, causing the role ping to silently fail when posting
on-clock announcements after auto-draft picks.

Fix: Added guild lookup from bot.get_guild(config.guild_id) at the
start of the method.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Cal Corum 2025-12-12 18:46:16 -06:00
parent e3122fa23a
commit 7744e77e83
2 changed files with 6 additions and 1 deletions

View File

@ -1 +1 @@
2.24.1 2.24.2

View File

@ -389,6 +389,11 @@ class DraftMonitorTask:
""" """
try: try:
config = get_config() config = get_config()
guild = self.bot.get_guild(config.guild_id)
if not guild:
self.logger.error("Could not find guild for on-clock announcement")
return
# Refresh draft data to get updated currentpick and deadline # Refresh draft data to get updated currentpick and deadline
updated_draft_data = await draft_service.get_draft_data() updated_draft_data = await draft_service.get_draft_data()