-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
34 lines (27 loc) · 860 Bytes
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using DSharpPlus;
namespace SeekDeeper
{
internal class Program
{
static async Task Main(string[] args)
{
string? token = Environment.GetEnvironmentVariable("SeekDeepToken");
if (token == null)
{
return;
}
DiscordClientBuilder builder = DiscordClientBuilder.CreateDefault
(
token: token,
intents: DiscordIntents.GuildMessages | DiscordIntents.MessageContents
);
builder.ConfigureEventHandlers
(
_event => _event.HandleMessageCreated(async (_client, _args) => await Handler.Run(_client, _args))
);
DiscordClient client = builder.Build();
await client.ConnectAsync();
await Task.Delay(-1);
}
}
}