Trap exceptions from process message

This commit is contained in:
barelyprofessional
2025-09-12 13:44:48 -05:00
parent 77f1321b00
commit 74be702473
+9 -1
View File
@@ -291,7 +291,15 @@ public class ChatBot
!InitialStartCooldown) !InitialStartCooldown)
{ {
_logger.Debug("Passing message to command interface"); _logger.Debug("Passing message to command interface");
_botCommands.ProcessMessage(message); try
{
_botCommands.ProcessMessage(message);
}
catch (Exception e)
{
_logger.Error("ProcessMessage threw an exception");
_logger.Error(e);
}
} }
// Update or add the element to keep it in sync // Update or add the element to keep it in sync