Bot连接到聊天,但不播放音频-Discord.py Rewrite

时间:2020-05-14 00:02:19

标签: python ffmpeg url-rewriting discord

这是命令 它没有任何错误,但仍然无法播放任何音频

@bot.command(pass_context=True,aliases=["Play,Song"])
async def playSongs(ctx):
    channel = ctx.message.author.voice.channel
    if not channel:
        await ctx.send("You are not connected to a voice channel")
        return
    voice = get(bot.voice_clients, guild=ctx.guild)
    if voice and voice.is_connected():
        await voice.move_to(channel)
    else:
        voice = await channel.connect()
    source = FFmpegPCMAudio('song.m4a')
    player = voice.play(source)

0 个答案:

没有答案