I want to make my discord bot to connect to the voice channel I am when I type !join
.
i have tried to do it with the following code but i got this error:
bot: BotInstance of 'Bot' has no 'voice_client_int' memberpylint(no-member)
i found that my code is not compatible with the rewrite discord version.
@bot.command(pass_context = True)
async def join(ctx):
channel = ctx.message.author.voice.voice_channel
await bot.join_voice_channel(channel)
@bot.command(pass_context = True)
async def leave(ctx):
server = ctx.message.server
voice_client = bot.voice_client_int(server)
await voice_client.disconnect()
can someone help me?