From 86039bb4297b6c036e388c9bc879d53d1fe02a0e Mon Sep 17 00:00:00 2001 From: Twinki Date: Mon, 13 Nov 2023 20:01:03 -0500 Subject: [PATCH] Update GuildEventScheduleService.cs --- .../Services/Hosted/GuildEventScheduleService.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/Miha.Discord/Services/Hosted/GuildEventScheduleService.cs b/src/Miha.Discord/Services/Hosted/GuildEventScheduleService.cs index aa5fc76..efd7633 100644 --- a/src/Miha.Discord/Services/Hosted/GuildEventScheduleService.cs +++ b/src/Miha.Discord/Services/Hosted/GuildEventScheduleService.cs @@ -142,10 +142,20 @@ private async Task PostWeeklyScheduleAsync() location = "Discord"; } - builder.AppendLine($"- [{location}]({url})"); + builder.AppendLine($"- [{location} - {guildEvent.Name}]({url})"); + builder.AppendLine($" - {guildEvent.StartTime.ToDiscordTimestamp(TimestampTagStyles.ShortTime)} - {guildEvent.StartTime.ToDiscordTimestamp(TimestampTagStyles.Relative)}"); + + if (guildEvent.Creator is not null) + { + builder.AppendLine($" - Hosted by {guildEvent.Creator.Mention}"); + } } - await weeklyScheduleChannel.SendMessageAsync(builder.ToString()); + var embed = new EmbedBuilder() + .WithColor(Color.Purple) + .WithDescription(builder.ToString()); + + await weeklyScheduleChannel.SendMessageAsync(embed: embed.Build()); /*### Monday - - [Discord - Lord of the Rings: Fellowship of the Ring - 20th Anniversary viewing!](https://discord.gg/VqqEgBTe?event=1170558838718603284)