This is my code:
#Ticket
@client.command(pass_context=True)
async def setuppartnership(ctx):
guild = ctx.guild
embed = discord.Embed(
title = 'Richiesta Partnership',
description = 'Vuoi fare partnership? Usa la reazione qui sotto per creare un nuovo ticket.',
color=0x53eeff
)
msg = await ctx.send(embed=embed)
await msg.add_reaction("")
msg = await msg.channel.fetch_message(msg.id)
while True:
def check(reaction, user):
return str(reaction) == '' and ctx.author == user
await client.wait_for("reaction_add", check=check)
ticket_channel = await guild.create_text_channel(name=f'partnership・{ctx.author.name}')
await ticket_channel.set_permissions(ctx.author, send_messages=True, read_messages=True, add_reactions=True, embed_links=True, attach_files=True, read_message_history=True, external_emojis=True)
await ticket_channel.set_permissions(ctx.guild.get_role(ctx.guild.id), send_messages=False, read_messages=False)
#This code works, but I have a problem: Only those who execute the command to generate the reaction message to open the tickets can open one, let me explain: If I run the command !setuppartnership it generates a command from which I click on the reaction he opens a ticket, but he only creates it for me who executed the command, because if another account clicks on the reaction nothing happens, you could kindly help me.