Advertisement
Guest User

Untitled

a guest
May 10th, 2020
10
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2. from selenium import webdriver
  3. from selenium.webdriver.common.keys import Keys
  4. from selenium.webdriver.common.action_chains import ActionChains
  5. import telebot
  6. from telebot import types
  7. import datetime
  8. import calendar
  9. import telegramcalendar
  10. import logging
  11. from selenium.webdriver.common.by import By
  12. from time import sleep
  13.  
  14.  
  15. bot = telebot.TeleBot('1173699882:AAGpJD6jHDo7Wtb_Q7waQh3G8rNftkbRVko')
  16.  
  17. @bot.message_handler(commands=['start'])
  18. def calendar_handler(bot,update):
  19. update.message.reply_text("Please select a date: ",
  20. reply_markup=telegramcalendar.create_calendar())
  21.  
  22.  
  23. def inline_handler(bot,update):
  24. selected,date = telegramcalendar.process_calendar_selection(bot, update)
  25. if selected:
  26. bot.send_message(chat_id=update.callback_query.from_user.id,
  27. text="You selected %s" % (date.strftime("%d/%m/%Y")),
  28. reply_markup=ReplyKeyboardRemove())
  29. bot.polling()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement