Discord.Webhooks
1.0.0
dotnet add package Discord.Webhooks --version 1.0.0
NuGet\Install-Package Discord.Webhooks -Version 1.0.0
<PackageReference Include="Discord.Webhooks" Version="1.0.0" />
paket add Discord.Webhooks --version 1.0.0
#r "nuget: Discord.Webhooks, 1.0.0"
// Install Discord.Webhooks as a Cake Addin
#addin nuget:?package=Discord.Webhooks&version=1.0.0
// Install Discord.Webhooks as a Cake Tool
#tool nuget:?package=Discord.Webhooks&version=1.0.0
Discord.Webhooks
A simple library for sending messages using a Discord Webhook in C#.NET.
Usage
This library is simple, in that it consists of only a single object, the Webhook
object. Everytime you want to send a message, you can simply initialise a new object, specify the information, then call Webhook.SendInstance()
.
If you're in a memory-conscious environment, and want to save system resources - you can just modify the values of an existing Webhook
object and send it once again. That'll work in just the same way.
Example
Here's how I can see most people using the library:
var webhook = new Webhook()
{
Message = "Hello world!",
Username = "Max's Wonderful Assistant",
WebhookUrl = "[redacted]"
};
webhook.SendInstance();
However, if you're one for compact code; sure - use this:
new Webhook()
{
Message = "Hello world!",
Username = "Max's Wonderful Assistant",
WebhookUrl = "[redacted]",
}.SendInstance();
Finally, like most .NET objects, you can modify the values of an existing object after creating it.
var webhook = new Webhook()
{
Message = "Hello world!",
Username = "Max's Wonderful Assistant",
WebhookUrl = "[redacted]"
};
webhook.SendInstance();
webhook.Message = "How are you today?";
webhook.SendInstance();
Please note that this library will not control any rate limiting, so it's quite possible that you may get an Exception if you call the API in a loop. Just saying! 😂
Pull Requests
If you want to add some more features - feel free. Just send me a message in my Discord Server if you send a pull request, because otherwise I'm unlikely to notice! Any additional features you'd like to add are more than appreciated, and I look forward to seeing what people might add! 👀
Contact
If you want to contact me regarding this project, the best way to do so is, like above - in my Discord Server.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net5.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 1,773 | 6/13/2021 |
Upload first version