From 5fdfc38870164dabfc7b91059c6912edb46dfd69 Mon Sep 17 00:00:00 2001 From: Siphalor Date: Fri, 12 Mar 2021 21:31:54 +0100 Subject: [PATCH] Fix temporary vc permissions --- bot.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/bot.py b/bot.py index 2ad8676..3ff5a02 100644 --- a/bot.py +++ b/bot.py @@ -527,11 +527,10 @@ async def groupvc_command(ctx: commands.Context): await ctx.send("Temporary group channel already exists.") return - vc = await category.create_voice_channel(channel.name + "_vc", - overwrites={ - role: discord.PermissionOverwrite(view_channel=True) - }, - reason="Create temporary vc for group " + channel.name) + reason = "Create temporary vc for group " + channel.name + vc = await category.create_voice_channel(channel.name + "_vc", reason=reason) + await vc.edit(sync_permissions=True, reason=reason) + await vc.set_permissions(role, view_channel=True, connenct=True, reason=reason) await ctx.send("Created temporary vc for this group") return