public async Task ManageServer() { if (!PermissionsUtils.CheckForPermissions(Context, GuildPermission.Administrator)) { await ReplyAsync(MessagingUtils.GetNoPermissionsString()); return; } var server = Database.GetServer(Context.Guild.Id); var navigator = ManagementService.CreateBotModerationNavigator(server, Context.Guild); await ReplyAsync(embed : navigator.GetHomePage(Context).Build()); while (true) { var response = await NextMessageAsync(timeout : new TimeSpan(0, 0, 0, 0, -1)); // Infinite timeout string responseString = response.ToString().ToLower(); if (responseString == "1") { navigator.Navigate(ServerProperty.AllowsPotentialNSFW); } else if (responseString == "2") { navigator.Navigate(ServerProperty.LoggingChannel); } else if (responseString == "3") { navigator.Navigate(ServerProperty.SystemChannel); } else if (responseString == "quit") { return; } else { await ReplyAsync("That's not a valid property. If you need to exit, type 'quit'."); continue; } var x = await ReplyAsync(embed : navigator.GetFormattedCurrentPage(Context.User).Build()); while (true) { var pageResponse = await NextMessageAsync(timeout : new TimeSpan(0, 0, 0, 0, -1)); // Infinite timeout string pageResponseString = pageResponse.ToString().ToLower(); if (pageResponseString == "quit") { return; } if (pageResponseString == "back") { await ReplyAsync(embed : navigator.GetHomePage(Context).Build()); break; } if (navigator.Set(pageResponseString.TrimStart("set".ToCharArray()).TrimStart())) { Database.WriteServer(navigator.Server); await ReplyAsync(embed : navigator.GetHomePage(Context).Build()); break; } else { await ReplyAsync("Your input wasn't valid."); continue; } } } }