diff --git a/cogs/ticket.py b/cogs/ticket.py index e3d1bc3..c631569 100644 --- a/cogs/ticket.py +++ b/cogs/ticket.py @@ -37,15 +37,16 @@ async def set_log_channel( ephemeral=True, ) + @slash_command(name="ticket") async def create_ticket(self, inter: nextcord.Interaction) -> None: category = nextcord.utils.get(inter.guild.categories, id=TICKET_CATEGORY) new_channel = await category.create_text_channel( - inter.user.name, - overwrites=None, - reason=f"Made ticket for {inter.user.name}", + name=f"ticket-{inter.user.name}", + reason=f"Created ticket for {inter.user.id} - {inter.user.name}", + ) + await inter.response.send_message( + f"Ticket created: <#{new_channel.id}>", ephemeral=True ) - await new_channel.send("This is your new channel!") - await interaction.response.send_message(f"Channel created: <#{new_channel.id}>") def setup(bot: Bot) -> None: