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,6 +1,5 @@
import discord
from discord.ext import commands
from discord import app_commands
import disnake
from disnake.ext import commands
from datetime import datetime
from commandes.ticket.data.storage import get_storage
@ -11,8 +10,8 @@ class StaffLeaderboard(commands.Cog):
def __init__(self, bot):
self.bot = bot
@app_commands.command(name="staff-leaderboard", description="Affiche le classement du staff")
async def staff_leaderboard(self, interaction: discord.Interaction):
@commands.slash_command(name="staff-leaderboard", description="Affiche le classement du staff")
async def staff_leaderboard(self, interaction: disnake.ApplicationCommandInteraction):
"""Commande pour afficher le classement du staff"""
await interaction.response.defer(ephemeral=False)
@ -31,10 +30,10 @@ class StaffLeaderboard(commands.Cog):
staff_list.sort(key=lambda x: x['average_rating'], reverse=True)
# Create embed
embed = discord.Embed(
embed = disnake.Embed(
title="🏆 Classement du Staff",
description="Classement des meilleurs membres du staff",
color=discord.Color.gold(),
color=disnake.Color.gold(),
timestamp=datetime.now()
)