Migration de Kuby vers disnake

This commit is contained in:
Mathis 2026-05-06 17:07:09 +02:00
parent dc6e235f27
commit c8c579eefe
36 changed files with 1205 additions and 1253 deletions

View file

@ -1,5 +1,5 @@
import discord
from discord.ext import commands
import disnake
from disnake.ext import commands
import json
import os
from datetime import datetime
@ -23,11 +23,11 @@ class LogsManager(commands.Cog):
log_chan = get_log_channel(message.guild, settings)
if log_chan:
embed = discord.Embed(
embed = disnake.Embed(
title="🗑️ Message Supprimé",
description=f"**Auteur :** {message.author.mention}\n**Salon :** {message.channel.mention}",
color=0xFFA500,
timestamp=datetime.utcnow()
timestamp=disnake.utils.utcnow()
)
embed.add_field(name="Contenu", value=message.content or "*(Image ou Embed)*")
await log_chan.send(embed=embed)
@ -37,11 +37,11 @@ class LogsManager(commands.Cog):
settings = dict(json.load(open(SETTINGS_FILE, "r"))).get(str(member.guild.id), {})
log_chan = get_log_channel(member.guild, settings)
if log_chan:
embed = discord.Embed(
embed = disnake.Embed(
title="📤 Départ d'un membre",
description=f"{member.mention} ({member.id}) a quitté le serveur.",
color=0xFF0000,
timestamp=datetime.utcnow()
timestamp=disnake.utils.utcnow()
)
await log_chan.send(embed=embed)
@ -50,11 +50,11 @@ class LogsManager(commands.Cog):
settings = dict(json.load(open(SETTINGS_FILE, "r"))).get(str(guild.id), {})
log_chan = get_log_channel(guild, settings)
if log_chan:
embed = discord.Embed(
embed = disnake.Embed(
title="🔨 Bannissement",
description=f"**Utilisateur :** {user.mention} ({user.id}) a été banni.",
color=0x000000,
timestamp=datetime.utcnow()
timestamp=disnake.utils.utcnow()
)
await log_chan.send(embed=embed)