modified: bot.py

This commit is contained in:
SimolZimol
2024-10-29 22:33:04 +01:00
parent 7cd59c95b3
commit 4916bfccc6

7
bot.py
View File

@@ -617,7 +617,6 @@ background_data = read_background_data("background_data.txt")
@client.event @client.event
async def on_ready(): async def on_ready():
update_user_data_task.start()
client.loop.create_task(process_ai_queue()) client.loop.create_task(process_ai_queue())
logger.info("Bot is ready!") logger.info("Bot is ready!")
logger.info(f"Logged in as: {client.user.name}") logger.info(f"Logged in as: {client.user.name}")
@@ -640,12 +639,6 @@ async def on_ready():
except requests.exceptions.RequestException: except requests.exceptions.RequestException:
logger.info("Failed to connect to version server.") logger.info("Failed to connect to version server.")
await update_all_users()
@tasks.loop(hours=24) # Läuft alle 24 Stunden
async def update_user_data_task():
await update_all_users()
@client.event @client.event
async def on_command_error(ctx, error): async def on_command_error(ctx, error):
logger.error(f"An error occurred while executing the command: {error}") logger.error(f"An error occurred while executing the command: {error}")