From 61b0fdf733b1971f1b997a6ed28fb150462dbe58 Mon Sep 17 00:00:00 2001 From: Vilmos Zsombor TANCZOS Date: Mon, 28 Apr 2025 12:20:52 +0200 Subject: [PATCH] initial commit --- .gitignore | 3 +++ Program.cs | 25 +++++++++++++++++++++++++ k-dc-bot-cs.csproj | 16 ++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 .gitignore create mode 100644 Program.cs create mode 100644 k-dc-bot-cs.csproj diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..06393f6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +obj/ +bin/ +.env diff --git a/Program.cs b/Program.cs new file mode 100644 index 0000000..b855ace --- /dev/null +++ b/Program.cs @@ -0,0 +1,25 @@ +using dotenv.net; +using dotenv.net.Utilities; +using DSharpPlus; + +namespace KBot; + +class Program +{ + static async Task Main(string[] args) + { + DotEnv.Load(); + + var discord = new DiscordClient( + new DiscordConfiguration() + { + Token = EnvReader.GetStringValue("DISCORD_TOKEN"), + TokenType = TokenType.Bot, + Intents = DiscordIntents.AllUnprivileged | DiscordIntents.MessageContents, + } + ); + + await discord.ConnectAsync(new DSharpPlus.Entities.DiscordActivity("bing chillin")); + await Task.Delay(-1); + } +} diff --git a/k-dc-bot-cs.csproj b/k-dc-bot-cs.csproj new file mode 100644 index 0000000..aad1e59 --- /dev/null +++ b/k-dc-bot-cs.csproj @@ -0,0 +1,16 @@ + + + + Exe + net9.0 + k_dc_bot_cs + enable + enable + + + + + + + +