#need example of permission_overwrites for guild.create_channel

1 messages · Page 1 of 1 (latest)

fossil totemBOT
#

Hey! Once your issue is solved, press the button below to close this thread!

warm vale
#

The permission syntax is Permissions.CREATE_CHANNEL

vagrant cosmos
#
# Make overwrites
        overwrites = [
            # Make @everyone unable to view the channel
            PermissionOverwrite(id=int(ctx.guild_id), type=0, deny=Permissions.VIEW_CHANNEL),
            # Allow user who created ticket to view and send messages in the channel
            PermissionOverwrite(id=int(ctx.author.user.id), type=1, allow=Permissions.VIEW_CHANNEL | Permissions.SEND_MESSAGES | Permissions.ATTACH_FILES),
            # Allow role to view and send messages
            PermissionOverwrite(
                id=staff_roles["helper"], type=0, allow=Permissions.VIEW_CHANNEL | Permissions.SEND_MESSAGES),
            PermissionOverwrite(
                id=staff_roles["moderator"], type=0, allow=Permissions.VIEW_CHANNEL | Permissions.SEND_MESSAGES),
            PermissionOverwrite(
                id=staff_roles["developer"], type=0, allow=Permissions.VIEW_CHANNEL | Permissions.SEND_MESSAGES),
            PermissionOverwrite(   
                id=staff_roles["admin"], type=0, allow=Permissions.VIEW_CHANNEL | Permissions.SEND_MESSAGES)
        ]

This is how i do overwrites