Bot代码:
import discord
import youtube_dl
from discord.ext import commands
client = commands.Bot(command_prefix = "e!")
players = {}
@client.event
async def on_ready():
print("Bot çevrimiçi!")
@client.command(pass_context = True)
async def baglan(ctx):
channel = ctx.message.author.voice.voice_channel
await client.join_voice_channel(channel)
@client.command(pass_context = True)
async def oynat(ctx, url):
server = ctx.message.server
voice_client = client.voice_client_in(server)
player = await voice_client.create_ytdl_player(url)
players[server.id] = player
player.start()
client.run('')
错误:
^{pr2}$bot通常在我自己的电脑上运行,但我目前正在Heroku
服务器上运行。机器人加入频道,但不播放音频。在
我想不出解决这个问题的办法 提前谢谢你的帮助。在
目前没有回答
相关问题 更多 >
编程相关推荐