Code: Select all
from discord import Intents, Client, Message, app_commands
from discord.voice_client import VoiceClient
< /code>
@tree.command(
name="play",
description="insert a youtube url for music",
guild = discord.Object(id=806555220468432906)
)
async def play_command(command) -> None:
source = discord.PCMVolumeTransformer(discord.FFmpegPCMAudio("Music.m4a"))
VoiceClient.play(source)`
< /code>
This code produces the error:
TypeError: VoiceClient.play() missing 1 required positional argument: 'source'
Ich habe versucht, die Codierung von FFMPEG zu ändern und gleichzeitig den gleichen Fehler zu erhalten.
Hilfe