Notify when live

This commit is contained in:
2024-01-10 14:02:03 +00:00
parent 5b5f011df0
commit f571579141
4 changed files with 50 additions and 1 deletions

View File

@ -0,0 +1,21 @@
using System.Net.Http.Formatting;
namespace NostrStreamer.Services;
public class DiscordWebhook
{
private readonly HttpClient _client;
public DiscordWebhook(HttpClient client)
{
_client = client;
}
public async Task SendMessage(Uri webhook, string msg)
{
await _client.PostAsync(webhook, new
{
content = msg
}, new JsonMediaTypeFormatter());
}
}