예제 #1
0
 public long GetSelectedWebhook()
 {
     if (WebHookDB.IDExists(Settings.CurrentWebHook))
     {
         return(Settings.CurrentWebHook);
     }
     if (WebHookDB.HasEntries())
     {
         return(WebHookDB.GetWebHooks().Min(wh => wh.ID));
     }
     return(WebHookDB.GetWebHooks().First().ID);
 }
예제 #2
0
        public void SetSelectedWebhook(long id)
        {
            if (!WebHookDB.IDExists(id))
            {
                return;
            }

            Settings.CurrentWebHook = id;
            var mainSettings = new Settings();

            mainSettings.CurrentWebHook = id;
            mainSettings.Save();
        }
예제 #3
0
 public List <WebHook> GetWebHooks()
 {
     return(WebHookDB.GetWebHooks());
 }