Offline stream notifs are deleted after 60 seconds

This commit is contained in:
Kwoth 2016-12-24 07:36:21 +01:00
parent ff687ad5cc
commit bdcf98761d

View File

@ -108,7 +108,13 @@ namespace NadekoBot.Modules.Searches
var channel = server?.GetTextChannel(fs.ChannelId); var channel = server?.GetTextChannel(fs.ChannelId);
if (channel == null) if (channel == null)
return; 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 { } catch { }