Ejemplo n.º 1
0
 public Communication(string token, SafeList <User> users, SafeList <string> usersToSkip)
 {
     this.token       = token;
     this.users       = users;
     this.usersToSkip = usersToSkip;
     Bot            = new TelegramBotClient(token);
     Bot.OnMessage += BotOnMessageReceived;
 }
Ejemplo n.º 2
0
 public InstaShitQueue(SafeList <User> users, SafeList <string> usersToSkip, Communication communication)
 {
     this.users         = users;
     this.usersToSkip   = usersToSkip;
     this.communication = communication;
     if (File.Exists(Path.Combine(assemblyLocation, "queue.json")))
     {
         usersQueue = JsonConvert.DeserializeObject <Queue <QueueEntry> >(File.ReadAllText(Path.Combine(assemblyLocation, "queue.json")));
         if (DateTime.UtcNow.Hour >= 7)
         {
             dateTime = DateTime.UtcNow.Date;
         }
     }
     else
     {
         usersQueue = new Queue <QueueEntry>();
     }
 }
Ejemplo n.º 3
0
 public Communication(string token, SafeList <User> users, SafeList <string> usersToSkip,
                      SafeList <Tuple <string, DateTime, string> > whitelist) : this(token, users, usersToSkip)
 {
     useWhitelist   = true;
     this.whitelist = whitelist;
 }