Fix crash caused by variable initailise

This commit is contained in:
hibobmaster 2023-06-01 09:59:27 +08:00
parent f5e5e6fb4f
commit 985db37be2
No known key found for this signature in database

4
bot.py
View File

@ -87,6 +87,7 @@ class Bot:
self.import_keys_password = import_keys_password self.import_keys_password = import_keys_password
self.flowise_api_url = flowise_api_url self.flowise_api_url = flowise_api_url
self.flowise_api_key = flowise_api_key self.flowise_api_key = flowise_api_key
self.pandora_api_endpoint = pandora_api_endpoint
self.session = aiohttp.ClientSession() self.session = aiohttp.ClientSession()
@ -184,7 +185,6 @@ class Bot:
# initialize pandora # initialize pandora
if pandora_api_endpoint is not None: if pandora_api_endpoint is not None:
self.pandora_api_endpoint = pandora_api_endpoint
self.pandora = Pandora( self.pandora = Pandora(
api_endpoint=pandora_api_endpoint, clientSession=self.session api_endpoint=pandora_api_endpoint, clientSession=self.session
) )
@ -193,7 +193,7 @@ class Bot:
else: else:
self.pandora_api_model = pandora_api_model self.pandora_api_model = pandora_api_model
self.pandora_data = {} self.pandora_data = {}
def __del__(self): def __del__(self):
try: try: