Giter Site home page Giter Site logo

calendar-telegram's Introduction

About

🐒 Why unmonoqueteclea? It means typing monkey (in Spanish). And this Wikipedia entry will help you understand it. Although you will find me everywhere as unmonoqueteclea, my name is Pablo González Carrizo.

Most of my knowledge comes from other people that made her thoughts and code public (some of my favorites are RMS, PG or Prot). I am morally obliged to do my bit.

I consider myself an end-to-end engineer, the kind of person that can transform ideas into working prototypes in a few nights fueled with some cups of tea.

In my free time, I maintain some little side projects such us voilib or valencia-now.

Follow me

calendar-telegram's People

Contributors

chellarao-chowdary avatar grcanosa avatar josepdal avatar mhbahmani avatar unmonoqueteclea avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

calendar-telegram's Issues

Calendar not forwarding more than 1 month

I tried to use the code for a calendar in my python bot the following way:

def get_telefono(update: Update, context: CallbackContext) -> None:
    telefono = update.message.text
    context.user_data['telefono'] = telefono
    user_data = context.user_data
    respuesta = 'Fecha de Vencimiento AAAA-MM-DD'
    calendar = telegramcalendar.create_calendar()
    update.message.reply_text(respuesta, reply_markup=calendar)
    return GET_VENCIMIENTO

def get_vencimiento(update: Update, context: CallbackContext) -> None:
    bot = context.bot
    selected, date = telegramcalendar.process_calendar_selection(bot, update)
   
    if selected:
        respuesta = date.strftime("%d/%m/%Y")
        update.message.reply_text(respuesta, reply_markup=ReplyKeyboardRemove())
    return GET_PAGO

updater = Updater(settings.TOKEN)
        dispatcher = updater.dispatcher

        conv_handler = ConversationHandler(
            entry_points=[CommandHandler('start', start, Filters.user(username="@cokelopez"))],
            states={

            
                GET_TELEFONO: [MessageHandler(Filters.regex('^\+?1?\d{9,15}$'), get_telefono)],
                GET_VENCIMIENTO: [CallbackQueryHandler(get_vencimiento)],
            
                
            },
            fallbacks=[CommandHandler('cancel', cancel)],
            allow_reentry = True,

        )
        dispatcher.add_handler(conv_handler)
        dispatcher.add_error_handler(error)

        mode = os.environ.get("MODE", "polling")
      
        updater.start_polling()

        updater.idle()

The calendar is displayed and it start in August 2021 I click to forward to September and it workd, but when I try to forward to October or go back to August it does not work.

I'm using Django as a framework, I just pasted part of the code of my bot, I'm using the Context because I collect the answers.

Calendar after current day

How to make this kind of thing when you type /calendar , it has to show month with today's date and after? For example : if today is 28th of May , it has to show from 28 may till the end of may .

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.