This content is part of a third party extension that is not supported by the Cake project.
For more information about this extension see
Cake.Discord.
Summary
Post message to Discord WebHook.
Syntax
public DiscordChatMessageResult PostMessage(string webHookUrl, string content)
Examples
Information("This is a 'normal' message...");
var postMessageResult = Discord.Chat.PostMessage(
webHookUrl:"https://your_web_hook_url",
content:"This is a normal message."
);
if (postMessageResult.Ok)
{
Information("Message {0} successfully sent", postMessageResult.TimeStamp);
}
else
{
Error("Failed to send message: {0}", postMessageResult.Error);
}
Attributes
Type |
Description |
CakeAliasCategoryAttribute |
|
Parameters
Name |
Type |
Description |
webHookUrl |
string |
The URL for the webhook that messages should be sent to. |
content |
string |
Content of the message to send. |
Return Value