mirror of
https://github.com/aljazceru/chatgpt-telegram-bot.git
synced 2025-12-19 13:44:57 +01:00
Fix possible TypeError
domain plugin query json sometimes causes 'TypeError: Object of type datetime is not JSON serializable'
This commit is contained in:
@@ -52,7 +52,7 @@ class PluginManager:
|
||||
plugin = self.__get_plugin_by_function_name(function_name)
|
||||
if not plugin:
|
||||
return json.dumps({'error': f'Function {function_name} not found'})
|
||||
return json.dumps(await plugin.execute(function_name, **json.loads(arguments)))
|
||||
return json.dumps(await plugin.execute(function_name, **json.loads(arguments)), default=str)
|
||||
|
||||
def get_plugin_source_name(self, function_name) -> str:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user