예제 #1
0
        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;
        }
예제 #2
0
        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);
        }
예제 #3
0
 public BotCheckedRequest(RaidBotClient client) : base(CheckerOpcode.BotChecked)
 {
     Bot      = BasicBotInfo.FromClient(client);
     Progress = new CheckerProgress();
 }