mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-05-13 17:26:08 +03:00
Sanitize scheduled event names
Signed-off-by: Macintosh II <mctaylxrs@outlook.com>
This commit is contained in:
parent
8b659a6582
commit
2f56f75cf5
1 changed files with 5 additions and 5 deletions
|
@ -201,7 +201,7 @@ public sealed class ScheduledEventUpdateService : BackgroundService
|
||||||
|
|
||||||
var embed = new EmbedBuilder()
|
var embed = new EmbedBuilder()
|
||||||
.WithSmallTitle(string.Format(Messages.EventCreatedTitle, creator.GetTag()), creator)
|
.WithSmallTitle(string.Format(Messages.EventCreatedTitle, creator.GetTag()), creator)
|
||||||
.WithTitle(scheduledEvent.Name)
|
.WithTitle(Markdown.Sanitize(scheduledEvent.Name))
|
||||||
.WithDescription(embedDescription)
|
.WithDescription(embedDescription)
|
||||||
.WithEventCover(scheduledEvent.ID, scheduledEvent.Image)
|
.WithEventCover(scheduledEvent.ID, scheduledEvent.Image)
|
||||||
.WithCurrentTimestamp()
|
.WithCurrentTimestamp()
|
||||||
|
@ -298,7 +298,7 @@ public sealed class ScheduledEventUpdateService : BackgroundService
|
||||||
return Result.FromError(embedDescriptionResult);
|
return Result.FromError(embedDescriptionResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
var startedEmbed = new EmbedBuilder().WithTitle(string.Format(Messages.EventStarted, scheduledEvent.Name))
|
var startedEmbed = new EmbedBuilder().WithTitle(string.Format(Messages.EventStarted, Markdown.Sanitize(scheduledEvent.Name)))
|
||||||
.WithDescription(embedDescription)
|
.WithDescription(embedDescription)
|
||||||
.WithColour(ColorsList.Green)
|
.WithColour(ColorsList.Green)
|
||||||
.WithCurrentTimestamp()
|
.WithCurrentTimestamp()
|
||||||
|
@ -323,7 +323,7 @@ public sealed class ScheduledEventUpdateService : BackgroundService
|
||||||
return Result.FromSuccess();
|
return Result.FromSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
var completedEmbed = new EmbedBuilder().WithTitle(string.Format(Messages.EventCompleted, eventData.Name))
|
var completedEmbed = new EmbedBuilder().WithTitle(string.Format(Messages.EventCompleted, Markdown.Sanitize(eventData.Name)))
|
||||||
.WithDescription(
|
.WithDescription(
|
||||||
string.Format(
|
string.Format(
|
||||||
Messages.EventDuration,
|
Messages.EventDuration,
|
||||||
|
@ -360,7 +360,7 @@ public sealed class ScheduledEventUpdateService : BackgroundService
|
||||||
}
|
}
|
||||||
|
|
||||||
var embed = new EmbedBuilder()
|
var embed = new EmbedBuilder()
|
||||||
.WithSmallTitle(string.Format(Messages.EventCancelled, eventData.Name))
|
.WithSmallTitle(string.Format(Messages.EventCancelled, Markdown.Sanitize(eventData.Name)))
|
||||||
.WithDescription(":(")
|
.WithDescription(":(")
|
||||||
.WithColour(ColorsList.Red)
|
.WithColour(ColorsList.Red)
|
||||||
.WithCurrentTimestamp()
|
.WithCurrentTimestamp()
|
||||||
|
@ -421,7 +421,7 @@ public sealed class ScheduledEventUpdateService : BackgroundService
|
||||||
|
|
||||||
var earlyResult = new EmbedBuilder()
|
var earlyResult = new EmbedBuilder()
|
||||||
.WithDescription(
|
.WithDescription(
|
||||||
string.Format(Messages.EventEarlyNotification, scheduledEvent.Name,
|
string.Format(Messages.EventEarlyNotification, Markdown.Sanitize(scheduledEvent.Name),
|
||||||
Markdown.Timestamp(scheduledEvent.ScheduledStartTime, TimestampStyle.RelativeTime)))
|
Markdown.Timestamp(scheduledEvent.ScheduledStartTime, TimestampStyle.RelativeTime)))
|
||||||
.WithColour(ColorsList.Default)
|
.WithColour(ColorsList.Default)
|
||||||
.Build();
|
.Build();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue