From bdcf98761d6546d0ff51727feb147332945b0e25 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Sat, 24 Dec 2016 07:36:21 +0100 Subject: [PATCH] Offline stream notifs are deleted after 60 seconds --- .../Searches/Commands/StreamNotificationCommands.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Searches/Commands/StreamNotificationCommands.cs b/src/NadekoBot/Modules/Searches/Commands/StreamNotificationCommands.cs index b81626f2..8a09497e 100644 --- a/src/NadekoBot/Modules/Searches/Commands/StreamNotificationCommands.cs +++ b/src/NadekoBot/Modules/Searches/Commands/StreamNotificationCommands.cs @@ -108,7 +108,13 @@ namespace NadekoBot.Modules.Searches var channel = server?.GetTextChannel(fs.ChannelId); if (channel == null) return; - try { await channel.EmbedAsync(fs.GetEmbed(newStatus).Build()).ConfigureAwait(false); } catch { } + try + { + var msg = await channel.EmbedAsync(fs.GetEmbed(newStatus).Build()).ConfigureAwait(false); + if (!newStatus.IsLive) + msg.DeleteAfter(60); + } + catch { } } } catch { }