mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-04-20 00:43:36 +03:00
Merge branch 'master' into use-snowflake-empty-extension
This commit is contained in:
commit
32f2e80a40
1 changed files with 7 additions and 0 deletions
|
@ -317,6 +317,12 @@ public sealed class ScheduledEventUpdateService : BackgroundService
|
||||||
private async Task<Result> SendScheduledEventCompletedMessage(ScheduledEventData eventData, GuildData data,
|
private async Task<Result> SendScheduledEventCompletedMessage(ScheduledEventData eventData, GuildData data,
|
||||||
CancellationToken ct)
|
CancellationToken ct)
|
||||||
{
|
{
|
||||||
|
if (GuildSettings.EventNotificationChannel.Get(data.Settings).Empty())
|
||||||
|
{
|
||||||
|
data.ScheduledEvents.Remove(eventData.Id);
|
||||||
|
return Result.FromSuccess();
|
||||||
|
}
|
||||||
|
|
||||||
var completedEmbed = new EmbedBuilder().WithTitle(string.Format(Messages.EventCompleted, eventData.Name))
|
var completedEmbed = new EmbedBuilder().WithTitle(string.Format(Messages.EventCompleted, eventData.Name))
|
||||||
.WithDescription(
|
.WithDescription(
|
||||||
string.Format(
|
string.Format(
|
||||||
|
@ -349,6 +355,7 @@ public sealed class ScheduledEventUpdateService : BackgroundService
|
||||||
{
|
{
|
||||||
if (GuildSettings.EventNotificationChannel.Get(data.Settings).Empty())
|
if (GuildSettings.EventNotificationChannel.Get(data.Settings).Empty())
|
||||||
{
|
{
|
||||||
|
data.ScheduledEvents.Remove(eventData.Id);
|
||||||
return Result.FromSuccess();
|
return Result.FromSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue