public ListRequest(ListAction action, List <RaidBotClient> bots) : base(ListOpcode.List) { List <BasicBotInfo> info = new List <BasicBotInfo>(); foreach (var client in bots) { info.Add(BasicBotInfo.FromClient(client)); } _bots = info; _action = action; }
public static BasicBotInfo FromClient(RaidBotClient client) { BasicBotInfo bot = new BasicBotInfo() { At = client.Client.User.ToString(), Id = client.Client.User.Id.ToString(), Hypesquad = client.Client.User.Hypesquad.ToString() }; if (client.Client.User.TwoFactorAuth) { bot.Verification = "Phone verified"; } else if (client.Client.User.EmailVerified) { bot.Verification = "Email verified"; } else { bot.Verification = "None or locked"; } return(bot); }
public BotCheckedRequest(RaidBotClient client) : base(CheckerOpcode.BotChecked) { Bot = BasicBotInfo.FromClient(client); Progress = new CheckerProgress(); }