initial commit
This commit is contained in:
commit
61b0fdf733
3 changed files with 44 additions and 0 deletions
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
obj/
|
||||||
|
bin/
|
||||||
|
.env
|
||||||
25
Program.cs
Normal file
25
Program.cs
Normal file
|
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
16
k-dc-bot-cs.csproj
Normal file
16
k-dc-bot-cs.csproj
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
|
<RootNamespace>k_dc_bot_cs</RootNamespace>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="dotenv.net" Version="3.2.1" />
|
||||||
|
<PackageReference Include="DSharpPlus" Version="4.5.1" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue