Files
zap-stream-api/NostrStreamer/Services/DiscordWebhook.cs
2024-01-10 14:02:03 +00:00

22 lines
422 B
C#

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());
}
}