Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- from selenium import webdriver
- from selenium.webdriver.common.keys import Keys
- from selenium.webdriver.common.action_chains import ActionChains
- import telebot
- from telebot import types
- import datetime
- import calendar
- import telegramcalendar
- import logging
- from selenium.webdriver.common.by import By
- from time import sleep
- bot = telebot.TeleBot('1173699882:AAGpJD6jHDo7Wtb_Q7waQh3G8rNftkbRVko')
- @bot.message_handler(commands=['start'])
- def calendar_handler(bot,update):
- update.message.reply_text("Please select a date: ",
- reply_markup=telegramcalendar.create_calendar())
- def inline_handler(bot,update):
- selected,date = telegramcalendar.process_calendar_selection(bot, update)
- if selected:
- bot.send_message(chat_id=update.callback_query.from_user.id,
- text="You selected %s" % (date.strftime("%d/%m/%Y")),
- reply_markup=ReplyKeyboardRemove())
- bot.polling()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement