Skip to content

Instantly share code, notes, and snippets.

@blubbll
Created September 2, 2019 02:53
Show Gist options
  • Save blubbll/af49bbcd4b5a2437ca8fefc7dadf1eff to your computer and use it in GitHub Desktop.
Save blubbll/af49bbcd4b5a2437ca8fefc7dadf1eff to your computer and use it in GitHub Desktop.
c# post webhook discord
string payload = JsonConvert.SerializeObject(new
{
username = name,
content = msg,
embeds = new List<object>
{ new {
title = "Title",
description = "",
color = "15258703",
} }
});
client.PostAsync(Program.chat_hook, new StringContent(
payload, Encoding.UTF8, "application/json"));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment