mirror of
https://github.com/aljazceru/chatgpt-telegram-bot.git
synced 2025-12-20 22:24:57 +01:00
Added a warning log for the responsible exception
This commit is contained in:
@@ -490,7 +490,8 @@ class ChatGPTTelegramBot:
|
|||||||
allowed_user_ids = self.config['allowed_user_ids'].split(',')
|
allowed_user_ids = self.config['allowed_user_ids'].split(',')
|
||||||
if str(user_id) not in allowed_user_ids and 'guests' in self.usage:
|
if str(user_id) not in allowed_user_ids and 'guests' in self.usage:
|
||||||
self.usage["guests"].add_chat_tokens(total_tokens, self.config['token_price'])
|
self.usage["guests"].add_chat_tokens(total_tokens, self.config['token_price'])
|
||||||
except:
|
except Exception as e:
|
||||||
|
logging.warning(f'Failed to add tokens to usage_logs: {str(e)}')
|
||||||
pass
|
pass
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user