Skip to content
Snippets Groups Projects
Unverified Commit 0e8a962f authored by dnns01's avatar dnns01 Committed by GitHub
Browse files

Merge pull request #5 from dnns01/dnns01-patch-1

Fix uuid for appointments
parents 43972ffd 5e7b3d5b
No related branches found
No related tags found
No related merge requests found
......@@ -86,7 +86,7 @@ class Appointments(commands.GroupCog, name="appointments", description="Handle A
appointment = Appointment.create(channel=channel.id, message=0, date_time=date_time, reminder=reminder,
title=title, description=description, author=author_id, recurring=recurring,
reminder_sent=reminder == 0)
reminder_sent=reminder == 0, uuid=uuid.uuid4())
await interaction.response.send_message(embed=appointment.get_embed(), view=AppointmentView())
message = await interaction.original_message()
......
......@@ -48,7 +48,7 @@ class AppointmentView(discord.ui.View):
if appointment:
appointment = appointment[0]
await interaction.response.send_message("", file=File(appointment.get_ics_file(),
filename=f"{appointment.title}.ics"), ephemeral=True)
filename=f"{appointment.title}_{appointment.uuid}.ics"), ephemeral=True)
@discord.ui.button(label='Löschen', style=discord.ButtonStyle.gray, custom_id='appointment_view:delete', emoji="🗑")
async def delete(self, interaction: discord.Interaction, button: discord.ui.Button):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment