public override async Task <UpdateHandlingResult> HandleCommand(Update update, DefaultCommandArgs args) { string course = Regex.Match(args.RawInput, $@"[1-4]").Value; if (int.TryParse(course, out int courseNum)) { await Bot.Client.SendTextMessageAsync( update.Message.Chat.Id, "Выбери группу:", replyMarkup : keyboards.GetGroupsOfCourseKeyboard(courseNum)); } else { await Bot.Client.SendTextMessageAsync( update.Message.Chat.Id, "Нет такого курса - их всего 4..."); } return(UpdateHandlingResult.Handled); }
public ReplyKeyboardMarkup GetGroupsOfCourseKeyboard(int course) { return(keyboards.GetGroupsOfCourseKeyboard(course)); }