DiscordEmbed.Post
Skip to content
mnscript
StringResult DiscordEmbed.Post(string) 

Description ​

Posts the embed to the Discord bot.

Arguments ​

string - The Discord channel Webhook token.

Returns ​

StringResult

Example ​

msc
using System;
using Discord;

// Example webhook, find your own Webhook from your discord channel which you are admin of and replace it with that.
string webhook = "32094820394823489/5ASKdaxdfjk2bLKLDjlaj3sdlJDAS3dDjsadas43KJHLSAddDnkjASDkhlgijods243LVOwqQdjsakdkAFHkjfh78AJmL";

// Creates a DiscordEmbed, adds some fields and posts it to your webhook
DiscordEmbed embed = new DiscordEmbed();
embed.SetTitle("My Webhook");
embed.AddField("First Field", "First Content", true);
embed.AddField("Second Field", "Second Content", true);
embed.AddField("Last Field", "Last Content", false);
embed.Post(webhook);