fix(ticket): move mention into Container TextDisplay (Components V2)
All checks were successful
ci / ci (push) Successful in 45s
All checks were successful
ci / ci (push) Successful in 45s
This commit is contained in:
parent
c959a9753d
commit
064a5e65f4
1 changed files with 9 additions and 7 deletions
|
|
@ -176,7 +176,15 @@ class TicketModal(discord.ui.Modal, title="Nouveau Ticket"):
|
|||
)
|
||||
storage.save_ticket(ticket)
|
||||
|
||||
mention = interaction.user.mention
|
||||
if config.staff_role_id:
|
||||
mention += f" <@&{config.staff_role_id}>"
|
||||
if cat.staff_role_id:
|
||||
mention += f" <@&{cat.staff_role_id}>"
|
||||
|
||||
container = discord.ui.Container()
|
||||
container.add_item(discord.ui.TextDisplay(mention))
|
||||
container.add_item(discord.ui.Separator())
|
||||
container.add_item(
|
||||
discord.ui.TextDisplay(
|
||||
f"## Ticket — {cat.name}\n"
|
||||
|
|
@ -204,13 +212,7 @@ class TicketModal(discord.ui.Modal, title="Nouveau Ticket"):
|
|||
view = discord.ui.LayoutView()
|
||||
view.add_item(container)
|
||||
|
||||
mention = interaction.user.mention
|
||||
if config.staff_role_id:
|
||||
mention += f" <@&{config.staff_role_id}>"
|
||||
if cat.staff_role_id:
|
||||
mention += f" <@&{cat.staff_role_id}>"
|
||||
|
||||
await channel.send(content=mention, view=view)
|
||||
await channel.send(view=view)
|
||||
|
||||
await interaction.followup.send(f"Ticket cree : {channel.mention}", ephemeral=True)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue