答案 0 :(得分:1)
您可以使用 TextChannel.set_permissions
修改特定频道的权限,在您的情况下,只需遍历您需要的频道。
要删除权限,您需要将 overwrite
参数设置为 None
:
@client.command()
async def delete_perms(ctx):
channel_list = [ ] # Here goes the list of channel IDs to modify
member_list = [ ] # Here goes the list of member IDs that you want to remove permissions
for channel in channel_list:
channel_i = ctx.guild.get_channel(channel)
for member in member_list:
member_i = ctx.guild.get_member(member)
await channel_i.set_permissions(member_i, overwrite=None)
参考文献: