コード例 #1
0
        public async Task CheckAttendance(string list, ulong channelId)
        {
            //fetch result
            var channel = _discordSocketClient.GetChannel(channelId);

            if (channel == null)
            {
                await ReplyAsync("Invalid channel specified");
            }

            var result = _attendanceService.Check(list, channel);

            //log result
            await _loggingService.LogAsync(
                new LogMessage(LogSeverity.Info, "", message : result.Succeeded switch
            {
                true => result.StringRepresentation,
                false => result.Errors.ToString()
            }));