forked from TeamInklings/Octobot
Fix a crash in scheduled event early notification (#83)
This PR fixes a fatal crash that occurs when the bot tries to send an early notification for a scheduled event. An exception is thrown by `string#Format` when the argument list provided doesn't match the argument list in the template. This is fixed by correcting the template and the argument list Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
parent
488a1eec0c
commit
d0d663d2bb
4 changed files with 6 additions and 4 deletions
|
@ -359,7 +359,9 @@ public sealed class ScheduledEventUpdateService : BackgroundService
|
|||
}
|
||||
|
||||
var earlyResult = new EmbedBuilder()
|
||||
.WithSmallTitle(string.Format(Messages.EventEarlyNotification, scheduledEvent.Name), currentUser)
|
||||
.WithSmallTitle(
|
||||
string.Format(Messages.EventEarlyNotification, scheduledEvent.Name,
|
||||
Markdown.Timestamp(scheduledEvent.ScheduledStartTime, TimestampStyle.RelativeTime)), currentUser)
|
||||
.WithColour(ColorsList.Default)
|
||||
.WithCurrentTimestamp()
|
||||
.Build();
|
||||
|
|
Reference in a new issue