Skip to content

Fix AI message routing by initializing missing variables#14

Merged
NerdsCorp merged 1 commit intomainfrom
claude/fix-message-routing-l4dgC
Jan 18, 2026
Merged

Fix AI message routing by initializing missing variables#14
NerdsCorp merged 1 commit intomainfrom
claude/fix-message-routing-l4dgC

Conversation

@NerdsCorp
Copy link
Owner

The keyword detection wasn't working because two critical variables were undefined, causing the code to crash before reaching the keyword detection logic:

  • active_ai_channels: Dictionary to track which channels have AI enabled
  • AI_CHANNEL_TIMEOUT: Timeout constant for auto-disabling AI (set to 1 hour)

Keywords like 'ai', 'bot', 'query', 'data' now work without requiring the "/" prefix as configured in commands_config.json.

Fixes the following crashes:

  • NameError at line 770: 'active_ai_channels' is not defined
  • NameError at line 771: 'AI_CHANNEL_TIMEOUT' is not defined

The keyword detection wasn't working because two critical variables
were undefined, causing the code to crash before reaching the keyword
detection logic:

- active_ai_channels: Dictionary to track which channels have AI enabled
- AI_CHANNEL_TIMEOUT: Timeout constant for auto-disabling AI (set to 1 hour)

Keywords like 'ai', 'bot', 'query', 'data' now work without requiring
the "/" prefix as configured in commands_config.json.

Fixes the following crashes:
- NameError at line 770: 'active_ai_channels' is not defined
- NameError at line 771: 'AI_CHANNEL_TIMEOUT' is not defined
@NerdsCorp NerdsCorp merged commit 18c6821 into main Jan 18, 2026
1 check failed
@NerdsCorp NerdsCorp deleted the claude/fix-message-routing-l4dgC branch January 18, 2026 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants