mirror of
https://github.com/agessaman/meshcore-bot.git
synced 2026-08-04 17:59:36 +00:00
resolve edge case where get_channel_number() would return zero and the bot would respond in the public channel despite being unconfigured.
This commit is contained in:
@@ -283,6 +283,11 @@ class CommandManager:
|
||||
# Get channel number from channel name
|
||||
channel_num = self.bot.channel_manager.get_channel_number(channel)
|
||||
|
||||
# Check if channel was found (None indicates channel name not found)
|
||||
if channel_num is None:
|
||||
self.logger.error(f"Channel '{channel}' not found. Cannot send message.")
|
||||
return False
|
||||
|
||||
self.logger.info(f"Sending channel message to {channel} (channel {channel_num}): {content}")
|
||||
|
||||
# Use meshcore-cli send_chan_msg function
|
||||
|
||||
Reference in New Issue
Block a user