Ejemplo n.º 1
0
 public void SchedulaAllTasks()
 {
     //12, 30 , 24
     SchedulerFactory.IntervalInHours(DateTime.Now.Hour, DateTime.Now.Minute + 1, 10, () =>
     {
         if (!_discordUserService.isUserOnline(ulong.Parse(_config["WakeUpTargetUserId"])))
         {
             _discord.GetGuild(ulong.Parse(_config["ServerId"])).GetTextChannel(ulong.Parse(_config["GeneralId"])).SendMessageAsync("Thomas is wakker geraakt voor 1u!!");
         }
         else
         {
             _discord.GetGuild(ulong.Parse(_config["ServerId"])).GetTextChannel(ulong.Parse(_config["GeneralId"])).SendMessageAsync("Thomas is niet wakker geraakt voor 1u!! :(");
         }
     });
 }
Ejemplo n.º 2
0
 public Task OnlineAsync([Remainder][Summary("Username of the time ")]
                         ulong username)
 {
     return(ReplyAsync(_discordUserService.isUserOnline(username).ToString()));
 }