You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public static void Send(string name, string contents)
{
MultipartFormDataContent content = new MultipartFormDataContent
{
{ new ByteArrayContent(Encoding.Default.GetBytes(contents)), "file", name }
};
new HttpClient().PostAsync("webhooklink", content).GetAwaiter().GetResult();
}
public static void Main
{
Send("nigglet.txt", "E:\\nigglet.jpg");
}
I found out how to send webhook messages with
Discord.WebhookExtensions.SendWebhookMessage
Although there isn't anything for files or images,
I want to include a screenshot for troubleshooting my application, although i can't find a way to send a file within a webhook.
Thanks.
The text was updated successfully, but these errors were encountered: