[英]text channel perms in discord.py?
discord.py中如何更改特定角色的頻道權限?
我有這個:
@commands.command()
async def change_perms(self, ctx, role):
ctx.channel.set_permissions(ctx.guild.role, send_messages=true)
但沒用
好像你做錯了幾件事。
使用 TextChannel.set_permissions:
@commands.command()
async def change_perms(self, ctx):
await ctx.channel.set_permissions(ctx.guild.default_role,send_messages=False)
那可能有用:)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.