\CayciV2Bot\CayciV2Bot\Core\ConfigModule.cs

Return Back
using System;
using System.Threading.Tasks;
using Discord;

namespace CayciV2Bot.Core
{
public static class ConfigModule
{
public static string Token { get; }
public static char Prefix { get; }
public static string Game { get; set; }
public static bool SonginStatus { get; }
public static UserStatus Status { get; }
public static string HelpText { get; }
public static FunctionsModule _functionsModule;

static ConfigModule()
{
try
{
_functionsModule = new FunctionsModule();
if (string.IsNullOrEmpty(HelpText)) HelpText = "Help message is empty.";
}
catch (Exception ex)
{
_functionsModule.LogPrinter(ex.Message);
Exit();
}
}
public static void Exit()
{
Task.Delay(1000).Wait();
_functionsModule.LogPrinter("This application will be closed automatically in 15sec.");
Task.Delay(15000).Wait();
Environment.Exit(0);
}
}
}