Could someone tell me why this code fails to give tha author the permissions to message in the newly created channel for ticket ??
permission_overwrite = []
permission_overwrite.append(hikari.PermissionOverwrite(
id=ctx.guild_id,
type=hikari.PermissionOverwriteType.ROLE,
deny=hikari.Permissions.all_permissions()
))
permission_overwrite.append(hikari.PermissionOverwrite(
id=staff_role_id,
type=hikari.PermissionOverwriteType.ROLE,
allow=hikari.Permissions.SEND_MESSAGES
|hikari.Permissions.READ_MESSAGE_HISTORY
|hikari.Permissions.ADD_REACTIONS
|hikari.Permissions.USE_APPLICATION_COMMANDS
))
permission_overwrite.append(hikari.PermissionOverwrite(
id=ctx.author.id,
type=hikari.PermissionOverwriteType.MEMBER,
allow=hikari.Permissions.SEND_MESSAGES
|hikari.Permissions.READ_MESSAGE_HISTORY
|hikari.Permissions.VIEW_CHANNEL
))
ticket_channel_new = await ctx.app.rest.create_guild_text_channel(
guild=ctx.guild_id,
name=ticket_channel_name,
position=1,
topic=topic_to_display,
nsfw=False,
reason=description,
permission_overwrites=permission_overwrite
)
Am I doing something wrong here that I shouldn't do ? with relation to overwrites, I mean this thing works while denying everyone else's permissions to message or see the channel, but I have no idea why doesn't it work with the author and give the author permissions to send message or even see the channel.
no, even that doesn't work
I tried every possible combinations that were making sense to me
it is working now, ofc with a new bot tokken.