-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGlobalConfig.cs
More file actions
30 lines (26 loc) · 841 Bytes
/
GlobalConfig.cs
File metadata and controls
30 lines (26 loc) · 841 Bytes
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Discord.WebSocket;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Configuration.UserSecrets;
namespace Mint_Chan
{
internal class GlobalConfig
{
internal static SocketGuild? Server { get; set; }
internal static DiscordSocketClient? Client { get; set; }
internal static string token;
internal static ulong guildID;
static GlobalConfig()
{
var configBuilder = new ConfigurationBuilder();
configBuilder.AddUserSecrets<GlobalConfig>();
var configuration = configBuilder.Build();
token = configuration["token"];
guildID = ulong.Parse(configuration["GuildID"]);
}
}
}