this can go in the config file idk what i was thinking
This commit is contained in:
parent
33567fee2b
commit
07e15ff0fb
4 changed files with 3 additions and 13 deletions
|
@ -1,12 +0,0 @@
|
||||||
namespace EmperorPalpatine;
|
|
||||||
|
|
||||||
public static class Constants
|
|
||||||
{
|
|
||||||
public static readonly string[] BotNames = new[]
|
|
||||||
{
|
|
||||||
"Emperor Palpatine",
|
|
||||||
"Emperor Kevin",
|
|
||||||
"General Darian",
|
|
||||||
"Specialized Egg"
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -26,7 +26,7 @@ public class DiscordCommands : ApplicationCommandModule
|
||||||
StringBuilder userlist = new();
|
StringBuilder userlist = new();
|
||||||
StringBuilder botlist = new();
|
StringBuilder botlist = new();
|
||||||
foreach (User user in vm.cvm.Users) {
|
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) {
|
switch (user.Rank) {
|
||||||
case Rank.Admin:
|
case Rank.Admin:
|
||||||
b.Append(":red_circle: ");
|
b.Append(":red_circle: ");
|
||||||
|
|
|
@ -3,6 +3,7 @@ namespace EmperorPalpatine;
|
||||||
public class IConfig
|
public class IConfig
|
||||||
{
|
{
|
||||||
public string Username { get; set; }
|
public string Username { get; set; }
|
||||||
|
public string[] KnownBots { get; set; }
|
||||||
public string IPInfoToken { get; set; }
|
public string IPInfoToken { get; set; }
|
||||||
public int ConnectRetryMaxSeconds { get; set; }
|
public int ConnectRetryMaxSeconds { get; set; }
|
||||||
public ConfigDiscord Discord { get; set; }
|
public ConfigDiscord Discord { get; set; }
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
Username = "Emperor Palpatine"
|
Username = "Emperor Palpatine"
|
||||||
|
KnownBots = ["AnyOSInstallBot", "Emperor Palpatine", "Emperor Kevin", "General Darian", "Specialized Egg"]
|
||||||
IPInfoToken = "1234567890"
|
IPInfoToken = "1234567890"
|
||||||
ConnectRetryMaxSeconds = 120
|
ConnectRetryMaxSeconds = 120
|
||||||
VMs = [
|
VMs = [
|
||||||
|
|
Loading…
Reference in a new issue