sorry that this is probably rather easy to fix (I don't really understand the docs) But, I want a channel to be opened, so only the user and mods can see it. It will be opened when the user adds a reaction to the message, the reaction will then be deleted (leaving just the bot's reaction) Currently, my code is:
@commands.Cog.listener()
async def on_reaction_add(self, reaction, user):
if reaction.emoji == '':
if user.channel.id == 850622999577231370:
await message.remove_reaction("", user)
overwrites = {
guild.default_role: discord.PermissionOverwrite(read_messages=False),
guild.me: discord.PermissionOverwrite(read_messages=True)
}
n = random.randomint(1, 1000)
await guild.create_text_channel(f'Ticket {n}', overwrites=overwrites, categoty="Tickets")
else:
pass
else:
pass
It doesn't seem to run, since there is no error message, but no channels are created either