@@ -52,7 +52,9 @@ def chat(self, irc, msg, args, user_input):
5252
5353 # ---- Pre-cooldown check (UX polish) ----
5454 now = time .time ()
55- msg_wait = COOLDOWNS .should_wait_message (context_key , now , config ["cooldown" ])
55+ msg_wait = COOLDOWNS .should_wait_message (
56+ context_key , now , config ["cooldown" ]
57+ )
5658
5759 if msg_wait :
5860 irc .reply (msg_wait , prefixNick = False )
@@ -80,21 +82,28 @@ def chat(self, irc, msg, args, user_input):
8082 )
8183 )
8284
83- chunks = split_irc_reply_lines (response , chunk_size = config ["irc_chunk" ])
85+ chunks = split_irc_reply_lines (
86+ response , chunk_size = config ["irc_chunk" ]
87+ )
8488 if not chunks :
8589 irc .reply ("AI returned no response." , prefixNick = False )
8690 else :
8791 for chunk in chunks :
8892 irc .reply (chunk , prefixNick = False )
8993
9094 if config ["debug" ]:
91- log .info ("[Asyncio DEBUG] {}: {}" .format (context_key , response ))
95+ log .info (
96+ "[Asyncio DEBUG] {}: {}" .format (context_key , response )
97+ )
9298
9399 except Exception as error :
94100 log .error (
95- "[Asyncio] Exception in chat command: {}" .format (error ), exc_info = True
101+ "[Asyncio] Exception in chat command: {}" .format (error ),
102+ exc_info = True ,
103+ )
104+ irc .reply (
105+ "An unexpected error occurred. Check logs." , prefixNick = False
96106 )
97- irc .reply ("An unexpected error occurred. Check logs." , prefixNick = False )
98107
99108 def resetCommand (self , irc , msg , args ):
100109 """Reset your conversation memory for this channel (or PM)."""
0 commit comments