に参加し、私はこのエラーを取得する:は、音声チャネル(discord.py)
await client.join_voice_channel(voice_channel)
(エラーが発生しライン)
Traceback (most recent call last):
File "/usr/local/lib/python3.5/site-packages/discord/ext/commands/core.py", line 50, in wrapped
ret = yield from coro(*args, **kwargs)
File "bot.py", line 215, in sfx
vc = await client.join_voice_channel(voice_channel)
File "/usr/local/lib/python3.5/site-packages/discord/client.py", line 3176, in join_voice_channel
session_id_future = self.ws.wait_for('VOICE_STATE_UPDATE', session_id_found)
AttributeError: 'NoneType' object has no attribute 'wait_for'
上記の例外次の例外の直接の原因だった:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/site-packages/discord/ext/commands/bot.py", line 848, in process_commands
yield from command.invoke(ctx)
File "/usr/local/lib/python3.5/site-packages/discord/ext/commands/core.py", line 369, in invoke
yield from injected(*ctx.args, **ctx.kwargs)
File "/usr/local/lib/python3.5/site-packages/discord/ext/commands/core.py", line 54, in wrapped
raise CommandInvokeError(e) from e
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'NoneType' object has no attribute 'wait_for'
私は
0チャンネル名とチャンネルIDと、このエラーを取得しています機能:
description = "Bot"
bot_prefix = "!"
client = discord.Client()
bot = commands.Bot(description=description, command_prefix=bot_prefix)
@bot.command(pass_context=True)
async def join(ctx):
author = ctx.message.author
voice_channel = author.voice_channel
vc = await client.join_voice_channel(voice_channel)
'self.ws'は' None'です。どのように修正するかわからない、再現可能な例は与えていない。 – roganjosh
私は関数 – Francesco
を投稿しましたあなたのコードをもっと見ることができますか? – GiantsLoveDeathMetal