Код: Выделить всё
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'
Я попытался изменить кодирование ffmpeg, при этом получив такую же ошибку.
help
Подробнее здесь: https://stackoverflow.com/questions/794 ... ror-when-t