-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
20 lines (20 loc) · 778 Bytes
/
Program.cs
File metadata and controls
20 lines (20 loc) · 778 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
using LuduvoDotNet;
using LuduvoBot.Modules;
using Microsoft.Extensions.Hosting;
using NetCord;
using NetCord.Gateway;
using NetCord.Hosting.Gateway;
using NetCord.Hosting.Services;
using NetCord.Hosting.Services.ApplicationCommands;
using NetCord.Rest;
var builder=Host.CreateApplicationBuilder(args);
builder.Services.AddDiscordGateway(options =>
{
options.Token=Environment.GetEnvironmentVariable("DISCORD_TOKEN")??throw new InvalidOperationException("DISCORD_TOKEN environment variable is not set.");
options.Intents=GatewayIntents.All;
}).AddApplicationCommands();
var app=builder.Build();
app.AddApplicationCommandModule<UserModule>();
app.AddApplicationCommandModule<PlacesModule>();
app.AddApplicationCommandModule<VerificationModule>();
await app.RunAsync();