using System.Threading.Tasks;
using System.Security.Permissions;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.DependencyInjection;
var builder = new HostBuilder()
.ConfigureAppConfiguration(x =>
var config = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("config.json", false, true)
x.AddConfiguration(config);
x.SetMinimumLevel(LogLevel.Debug);
.ConfigureDiscordHost((context, config) =>
config.SocketConfig = new DiscordSocketConfig
LogLevel = LogSeverity.Debug,
AlwaysDownloadUsers = false,
config.Token = context.Configuration["token"];
.UseCommandService((context, config) =>
config.CaseSensitiveCommands = false;
config.LogLevel = LogSeverity.Debug;
config.DefaultRunMode = RunMode.Async;
.ConfigureServices((context, services) =>
var host = builder.Build();