Exemplo n.º 1
0
 public static SqliteManager Get()
 {
     if (null == sqliteManager)
     {
         sqliteManager = new SqliteManager();
     }
     return(sqliteManager);
 }
Exemplo n.º 2
0
        private static List <IMessageChannel> GetByCrawlType(string crawlType)
        {
            HashSet <IMessageChannel> channels = new();
            List <ulong> subbedChannels        = SqliteManager.Get().GetCrawlSubsList(crawlType);

            if (subbedChannels.Count == 0)
            {
                channels.Add(Tests);
            }
            else
            {
                subbedChannels.ForEach(c => channels.Add(DataManager._client.GetChannel(c) as SocketTextChannel ?? Tests));
            }

            return(new(channels));
        }