Skip to content

iisrak/DiscordWebHook-.NET

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

DiscordWebHook-.NET

API for using discord WebHooks in C#

Usage

using DiscordWebhook.NET;
using System;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static async Task Main(string[] args)
        {
            string WebhookLink = "WEBHOOK_LINK";    
        
            using (var Hook = new WebHook(WebhookLink))
            {
                Console.WriteLine(await Hook.ExistsAsync() ? "Exists" : "Doesn't exist"); // Exists
                await Hook.SendAsync("Hello there!");
                await Hook.DeleteAsync();
                Console.WriteLine(await Hook.ExistsAsync() ? "Exists" : "Doesn't exist"); // Doesn't exist
            }

            Console.ReadLine();
        }
    }
}

About

API for using discord WebHooks in C#

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages