示例#1
0
 public async Task fmtimerstatusAsync()
 {
     if (await _adminService.HasCommandAccessAsync(Context.User, UserType.Admin))
     {
         try
         {
             if (_timer.IsTimerActive())
             {
                 await ReplyAsync("Timer is active");
             }
             else
             {
                 await ReplyAsync("Timer is inactive");
             }
         }
         catch (Exception e)
         {
             _logger.LogError(e.Message, Context.Message.Content, Context.User.Username, Context.Guild?.Name, Context.Guild?.Id);
             await ReplyAsync("The timer service cannot be loaded. Please wait for the bot to fully load.");
         }
     }
 }