【发布时间】:2021-02-16 01:33:48
【问题描述】:
代码如下:
import discord
from discord.ext import commands
from discord.utils import get
TOKEN = ""
BOT_PREFIX = "!"
bot = commands.Bot(command_prefix=BOT_PREFIX)
@bot.command(pass_context=True, brief="Makes the bot join your channel", aliases=['j', 'jo'])
async def join(ctx):
channel = ctx.message.author.voice.channel
print(channel)
voice = await channel.connect()
当我加入语音频道时,我加入了命令,它会打印“音乐”。当我再次尝试时,它打印“音乐”并错误发送:discord.errors.ClientException: 已连接到语音通道。
我该怎么办?
【问题讨论】:
标签: python discord.py