private async Task <long> CreateTwitchMessage(TwitchStreamer streamer, Stream stream, TwitchAlertSubscription subscription, ITextChannel channel) { var message = await channel.SendMessageAsync($"@everyone {streamer.Name} is live!", embed : CreateTwitchEmbed(streamer, stream)); return((long)message.Id); }
private async Task <long> CreateTwitchMessage(TwitchStreamer streamer, Stream stream, TwitchAlertSubscription subscription) { var channel = _client.GetChannel((ulong)subscription.DiscordChannelId) as ITextChannel; if (!string.IsNullOrWhiteSpace(subscription.StreamMessage)) { await channel.SendMessageAsync(subscription.StreamMessage); } var message = await channel.SendMessageAsync(string.Empty, embed : CreateTwitchEmbed(streamer, stream)); return((long)message.Id); }