public static InlineKeyboardMarkup GetInlineAccessTokensKeyboard(IAccessTokensStorage tokensStorage) { var accessTokens = tokensStorage.GetAccessTokens(); return(new InlineKeyboardMarkup( accessTokens .Select(accessToken => new[] { InlineKeyboardButton.WithCallbackData(accessToken) }))); }
public Bot(IAccessTokensStorage accessTokensStorage) { this.accessTokensStorage = accessTokensStorage; botClient = new TelegramBotClient(accessTokensStorage.ApiAccessToken); schedule = new Schedule(); previousCommandByChatId = new Dictionary <long, BotCommand>(); selectedToEditDayByChatId = new Dictionary <long, WorkDay>(); keyboardMessageIdByChatId = new Dictionary <long, int>(); }