Ejemplo n.º 1
0
def add_cmd(bot, update):
    chat_id = update.message.chat_id
    user_id = update.message.from_user.id
    user_state = state.get(chat_id, MENU)
    if user_state == MENU:
        state[user_id] = AWAIT_MEMBER_INPUT  # set the state
        bot.sendMessage(
            chat_id=chat_id,
            text="Enter the user or member name(s). e.g. @poko @doko @noko",
            reply_to_message_id=update.message.message_id,
            reply_markup=ForceReply.de_json(json_dict))
Ejemplo n.º 2
0
def recvd_cmd(bot, update):
    chat_id = update.message.chat_id
    user_id = update.message.from_user.id
    message_id = update.message.message_id
    user_state = state.get(chat_id, MENU)

    if user_state == MENU:
        state[user_id] = AWAIT_RECVD_INPUT  # set the state
        bot.sendMessage(
            chat_id=chat_id,
            text=
            "Please share more details. Tag members as necessary. e.g.- $34 from @poko @doko ",
            reply_to_message_id=message_id,
            reply_markup=ForceReply.de_json(json_dict))
Ejemplo n.º 3
0
def paid_cmd(bot, update):
    chat_id = update.message.chat_id
    user_id = update.message.from_user.id
    message_id = update.message.message_id
    user_state = state.get(chat_id, MENU)

    if user_state == MENU:
        state[user_id] = AWAIT_PAID_INPUT  # set the state
        bot.sendMessage(
            chat_id=chat_id,
            text=
            "Alright. What did you pay for? How much? Tag members, share comments as necessary. e.g.- Paid $34 for lunch @poko @doko ",
            reply_to_message_id=message_id,
            reply_markup=ForceReply.de_json(json_dict))