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,7 +1,6 @@
# scan.py
import discord
from discord import app_commands
from discord.ext import commands
import disnake
from disnake.ext import commands
import hashlib
import os
import json
@ -59,8 +58,8 @@ class Scan(commands.Cog):
def __init__(self, bot: commands.Bot):
self.bot = bot
@app_commands.command(name="scan", description="Scanner un fichier pour détecter un malware.")
async def scan(self, interaction: discord.Interaction, file: discord.Attachment):
@commands.slash_command(name="scan", description="Scanner un fichier pour détecter un malware.")
async def scan(self, interaction: disnake.ApplicationCommandInteraction, file: disnake.Attachment):
await interaction.response.defer() # Permet de prendre un peu de temps pour le scan
# Téléchargement temporaire du fichier