Rapptz / discord.py

An API wrapper for Discord written in Python.
http://discordpy.rtfd.org/en/latest
MIT License
14.84k stars 3.76k forks source link

Add a user permission to a channel #1622

Closed sniff122 closed 6 years ago

sniff122 commented 6 years ago

How would i add permissions to a user for a channel so say there is channel-a and user-a has permission for it but user-b does not, i want to have the bot toggle the "read messages" and "send messages" permission toggle for user-b on channel-a

Harmon758 commented 6 years ago

https://discordpy.readthedocs.io/en/latest/api.html#discord.Client.edit_channel_permissions For the rewrite branch: https://discordpy.readthedocs.io/en/rewrite/api.html#discord.abc.GuildChannel.set_permissions

For future questions like this, you should join either the official discord.py server or the Discord API server for help, as the README recommends.