//static void Main(string[] args) //{ // ConfigValues.LoadConfig(); // TrackTimeLive(); // Clans.LoadClans(); // MainAsync().GetAwaiter().GetResult(); //} static async Task Main(string[] args) { Random = new Random(); ConfigValues.LoadConfig(); //TrackTimeLive(); Clans.LoadClans(); await SpreadsheetTools.SetUpSheet(); startTime = DateTime.UtcNow; await Discord.SetupClient(); await Task.Delay(-1); }
public async Task UpdateConf(CommandContext ctx) { var verification = await IsVerifiedAsync(ctx, true); if (verification == ErrorCode.Qualify) { Thread.CurrentThread.IsBackground = true; var discordEmbed = Core.Discord.CreateFancyMessage(DiscordColor.Orange, "Updating Configuration Files"); DiscordMessage message = await ctx.RespondAsync(discordEmbed); //call bulkupdate method ConfigValues.LoadConfig(); Clans.LoadClans(); await Core.Discord.UpdateChannels(); discordEmbed = Core.Discord.CreateFancyMessage(DiscordColor.SpringGreen, "Done", "Sucessfully updated configuration files"); await message.ModifyAsync(discordEmbed); await ThankUsage(ctx, DiscordColor.SpringGreen, 1); } }