discord.py 中的文本频道权限?
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)
这可能有用:)
如何更改 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)
这可能有用:)