Skip to content

Commit

Permalink
fix: remove unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
makcimerrr committed Jan 8, 2025
1 parent ef91fe0 commit 198ed5a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from discord.ui import Modal, TextInput

from cogs.gestion_help import SupremeHelpCommand
from utils.config_loader import config, discord_token, forum_channel_id, role_ping
from utils.config_loader import config, discord_token, forum_channel_id
from utils.scheduler import start_scheduler

intents = discord.Intents.all()
Expand All @@ -24,7 +24,7 @@ async def load_extensions(bot):
for extension in initial_extensions:
try:
await bot.load_extension(extension)
# print(f"Loaded {extension}")
print(f"Loaded {extension}")
except Exception as e:
print(f"Failed to load extension {extension}: {e}")

Expand Down Expand Up @@ -58,6 +58,7 @@ async def on_error(event, *args, **kwargs):
with open("err.log", "a") as f:
f.write(f"Error in {event}: {args[0]}\n")


@bot.event
async def on_message(message):
try:
Expand All @@ -67,7 +68,6 @@ async def on_message(message):
logging.error(f"An error occurred in event on_message: {message}", exc_info=True)



@bot.event
async def on_resumed():
print("Bot reconnected.")
Expand Down Expand Up @@ -110,7 +110,7 @@ async def on_command_error(ctx, error):
# Modifier le dernier embed avec les nouvelles erreurs
embed.title = "❌ Erreur d'Exécution"
embed.description = "Une erreur s'est produite lors de l'exécution de la commande. Veuillez réessayer plus tard."
embed.color=discord.Color.red()
embed.color = discord.Color.red()
embed.set_thumbnail(url=None)
embed.add_field(name="Erreur", value=error_message)
embed.add_field(name="Fichier", value=filename)
Expand Down

0 comments on commit 198ed5a

Please sign in to comment.