Skip to content

🐛 [CRITICAL] Missing await in nw_server_status causes monitor channels to never update #118

@anthropic-code-agent

Description

@anthropic-code-agent

Description

In nw_server_status/server_status.py, there is a critical bug where an async function is called without await, causing the coroutines to never execute.

Location

File: nw_server_status/server_status.py
Line: 134

Current Code

async def update_monitor_channels(self):
    for guild in self.bot.guilds:
        self.update_guild_channel(guild)  # ❌ Missing await!

Impact

  • Monitor channels are never updated because the coroutines are created but never awaited
  • This creates a RuntimeWarning in Python 3.10+: "coroutine was never awaited"
  • The entire monitor channel feature is non-functional

Expected Behavior

The monitor channels should update periodically with server status information.

Fix Required

async def update_monitor_channels(self):
    for guild in self.bot.guilds:
        await self.update_guild_channel(guild)  # ✅ Fixed

Priority

CRITICAL - This breaks the core functionality of the cog.

Testing

After fixing, verify that:

  1. Monitor channels are properly updated every 5 minutes
  2. No RuntimeWarning appears in logs
  3. Server status information is correctly displayed

Related

This is part of a comprehensive code review. See other issues for additional improvements.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions