public async Task DoGetRNStatusAsync()
        {
            var id = LogEventIdProvider.GetEventIdByType(LoggingEvent.RNSCommand);

            try
            {
                await ReplyAsync(_recruitmentService.GetRNStatus());
            }
            catch (Exception ex)
            {
                _logger.LogCritical(id, ex, LogMessageBuilder.Build(id, "A critical error occured"));
                await ReplyAsync($"Something went wrong :( ");
            }
        }
Exemplo n.º 2
0
        public async Task DoGetRNStatus()
        {
            var id = LogEventIdProvider.GetEventIdByType(LoggingEvent.RNSCommand);

            try
            {
                if (await _permManager.IsAllowedAsync(PermissionType.ManageRecruitment, Context.User))
                {
                    await ReplyAsync(_recruitmentService.GetRNStatus());
                }
                else
                {
                    await ReplyAsync(AppSettings.PERMISSION_DENIED_RESPONSE);
                }
            }
            catch (Exception ex)
            {
                _logger.LogCritical(id, ex, LogMessageBuilder.Build(id, "An critical error occured"));
                await ReplyAsync($"Something went wrong :( ");
            }
        }