Fix temporary vc permissions
This commit is contained in:
9
bot.py
9
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user