make a cool embed fo rlist sounds, also make a queue system for the soundboard (also in a embed)
and for the add sound command oyu need to make it, that it has a file upload thing to upload the sound. 

Code:
import discord
from discord.ext import commands
import os
from dotenv import load_dotenv
import asyncio

load_dotenv()
TOKEN = os.getenv('DISCORD_TOKEN')

intents = discord.Intents.default()
intents.message_content = True
intents.voice_states = True  # Required for voice channel operations

# Initialize the bot with a command tree (for application commands)
bot = commands.Bot(command_prefix='!', intents=intents)

disconnect_tasks = {}  # Keep track of disconnect tasks for each guild

# Create a 'sounds' directory if it doesn't exist
sounds_dir = 'sounds'
os.makedirs(sounds_dir, exist_ok=True)

# Event when the bot is ready
@bot.event
async def on_ready():
    print(f'{bot.user.name} has connected to Discord!')
    try:
        synced = await bot.tree.sync()
        print(f'Synced {len(synced)} commands.')
    except Exception as e:
        print(f'Error syncing commands: {e}')

# Add a sound command
@bot.tree.command(name='addsound', description='Add a new sound to the soundboard')
async def addsound(interaction: discord.Interaction, name: str):
    if len(interaction.message.attachments) == 0:
        await interaction.response.send_message('Please attach a sound file.', ephemeral=True)
        return

    attachment = interaction.message.attachments[0]
    filename = name + os.path.splitext(attachment.filename)[1]  # Keep the file extension

    filepath = os.path.join(sounds_dir, filename)
    await attachment.save(filepath)
    await interaction.response.send_message(f'Sound "{name}" added.', ephemeral=True)

# Play a sound command
@bot.tree.command(name='playsound', description='Play a sound from the soundboard')
async def playsound(interaction: discord.Interaction, name: str, timeout: int = 60):
    global disconnect_tasks
    if not interaction.user.voice or not interaction.user.voice.channel:
        await interaction.response.send_message('You are not connected to a voice channel.', ephemeral=True)
        return

    voice_channel = interaction.user.voice.channel

    filepath = os.path.join(sounds_dir, name)

    # Check for the sound file with common audio extensions
    sound_path = None
    for ext in ['.mp3', '.wav', '.ogg', '.aac', '.m4a']:
        if os.path.exists(filepath + ext):
            sound_path = filepath + ext
            break

    if sound_path is None:
        await interaction.response.send_message('Sound not found.', ephemeral=True)
        return

    vc = interaction.guild.voice_client

    if not vc or not vc.is_connected():
        vc = await voice_channel.connect()
    elif vc.channel != voice_channel:
        await vc.move_to(voice_channel)

    # Cancel any previous disconnect task
    if interaction.guild.id in disconnect_tasks:
        disconnect_tasks[interaction.guild.id].cancel()

    vc.play(discord.FFmpegPCMAudio(sound_path))

    # Start a new disconnect task
    disconnect_tasks[interaction.guild.id] = bot.loop.create_task(
        disconnect_after_timeout(vc, interaction.guild.id, timeout)
    )

    await interaction.response.send_message(f'Playing "{name}".')

async def disconnect_after_timeout(vc, guild_id, timeout):
    try:
        # Wait until the audio is done playing
        while vc.is_playing():
            await asyncio.sleep(1)
        # Wait for the specified timeout before disconnecting
        await asyncio.sleep(timeout)
        await vc.disconnect()
        # Remove the task from the dictionary
        disconnect_tasks.pop(guild_id, None)
    except asyncio.CancelledError:
        # Task was canceled because a new sound was played
        pass

# Delete a sound command
@bot.tree.command(name='delsound', description='Delete a sound from the soundboard')
async def delsound(interaction: discord.Interaction, name: str):
    filepath = os.path.join(sounds_dir, name)

    # Check for the sound file with common audio extensions
    sound_path = None
    for ext in ['.mp3', '.wav', '.ogg', '.aac', '.m4a']:
        if os.path.exists(filepath + ext):
            sound_path = filepath + ext
            break

    if sound_path is None:
        await interaction.response.send_message('Sound not found.', ephemeral=True)
        return

    os.remove(sound_path)
    await interaction.response.send_message(f'Sound "{name}" deleted.')

# List sounds command
@bot.tree.command(name='listsounds', description='List all available sounds')
async def listsounds(interaction: discord.Interaction):
    files = os.listdir(sounds_dir)
    if not files:
        await interaction.response.send_message('No sounds have been added yet.')
        return
    sound_names = [os.path.splitext(f)[0] for f in files]
    sound_list = ', '.join(sorted(set(sound_names)))
    await interaction.response.send_message(f'Available sounds: {sound_list}')

# Run the bot
bot.run(TOKEN)