this can go in the config file idk what i was thinking

This commit is contained in:
Elijah R 2024-04-02 22:57:53 -04:00
parent 33567fee2b
commit 07e15ff0fb
4 changed files with 3 additions and 13 deletions

View file

@ -1,12 +0,0 @@
namespace EmperorPalpatine;
public static class Constants
{
public static readonly string[] BotNames = new[]
{
"Emperor Palpatine",
"Emperor Kevin",
"General Darian",
"Specialized Egg"
};
}

View file

@ -26,7 +26,7 @@ public class DiscordCommands : ApplicationCommandModule
StringBuilder userlist = new();
StringBuilder botlist = new();
foreach (User user in vm.cvm.Users) {
var b = (Constants.BotNames.Contains(user.Username)) ? botlist : userlist;
var b = (Program.Config.KnownBots.Contains(user.Username)) ? botlist : userlist;
switch (user.Rank) {
case Rank.Admin:
b.Append(":red_circle: ");

View file

@ -3,6 +3,7 @@ namespace EmperorPalpatine;
public class IConfig
{
public string Username { get; set; }
public string[] KnownBots { get; set; }
public string IPInfoToken { get; set; }
public int ConnectRetryMaxSeconds { get; set; }
public ConfigDiscord Discord { get; set; }

View file

@ -1,4 +1,5 @@
Username = "Emperor Palpatine"
KnownBots = ["AnyOSInstallBot", "Emperor Palpatine", "Emperor Kevin", "General Darian", "Specialized Egg"]
IPInfoToken = "1234567890"
ConnectRetryMaxSeconds = 120
VMs = [