Fix changes in ics 0.8

This commit is contained in:
Michel Roux 2022-09-08 17:33:58 +00:00
parent e4d6bc90bd
commit a5da3341b9

View File

@ -119,12 +119,10 @@ async def ical(guild_id: str):
for scheduled_event in guild.scheduled_events:
event = Event()
event.name = scheduled_event.name
event.summary = scheduled_event.name
event.begin = scheduled_event.scheduled_start_time
event.end = (
scheduled_event.scheduled_end_time
or scheduled_event.scheduled_start_time + timedelta(hours=2)
)
event.end = scheduled_event.scheduled_end_time
event.duration = timedelta(hours=2)
event.uid = str(scheduled_event.id)
event.description = scheduled_event.description
event.url = f"https://discord.com/events/{guild_id}/{scheduled_event.id}"