简体   繁体   English

拒绝角色连接到某个语音通道 [discord.py]

[英]Deny role from connecting to a certain voice channel [discord.py]

This is my code for changing a voice channels permissions:这是我更改语音通道权限的代码:

permissions = ctx.channel.overwrites_for(team_role)
permissions. = False # What to write after permissions. ?
await channel.set_permissions(team_role, overwrite=permissions)

In line 2 I do not know what to write after permissions.在第 2 行中,我不知道permissions. in text channels it would be permissions.read_messages but I do not know what I should do for not allowing a role to connect to that voice channel.在文本通道中,它是permissions.read_messages但我不知道我应该怎么做才能不允许角色连接到该语音通道。 Where could I find that or what would that be?我在哪里可以找到那个或者那会是什么?

Thanks!谢谢!

After looking around, I couldn't find this in the docs but I just tried it out and it worked, its permissions.connect to deny someone permissions from connecting to a voice channel环顾四周后,我在文档中找不到这个,但我只是尝试了一下,它的工作原理,它的 permissions.connect 拒绝某人连接到语音频道的权限

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM