Migration de Kuby vers disnake
This commit is contained in:
parent
dc6e235f27
commit
c8c579eefe
36 changed files with 1205 additions and 1253 deletions
|
|
@ -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()
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue