예제 #1
0
def currency(call):
    current_currency = call.data[4:]  # Выбранная валюта
    chat = call.message.chat
    bot.edit_message_text(base.get_text(chat.id, 'operations'),
                          chat.id,
                          call.message.message_id,
                          reply_markup=markups.menu())
예제 #2
0
def my_requests(call):
    text = base.get_text(call.message.chat.id, 'no_req')
    bot.edit_message_text(text, call.message.chat.id, call.message.message_id)
    bot.edit_message_reply_markup(call.message.chat.id,
                                  call.message.message_id,
                                  reply_markup=markups.add_request(
                                      call.message.chat.id))
예제 #3
0
def exchange(msg):
    bot.send_message(msg.chat.id,
                     "Купить/Продать",
                     reply_markup=markups.exchangeR())
    bot.send_message(msg.chat.id,
                     base.get_text(msg.chat.id, "exchamge"),
                     reply_markup=markups.exchangeI())
예제 #4
0
def back(msg):
    bot.send_message(msg.chat.id,
                     "Операции покупки или продажи",
                     reply_markup=markups.addWelcome())
    bot.send_message(msg.chat.id,
                     base.get_text(msg.chat.id, "operations"),
                     reply_markup=markups.menu())
예제 #5
0
def welcome(msg):
    bot.send_message(msg.chat.id,
                     "Чат-поддержка",
                     reply_markup=markups.addWelcome())
    bot.send_message(msg.chat.id,
                     base.get_text(msg.chat.id, 'welcome_inf') %
                     msg.from_user.first_name,
                     reply_markup=markups.welcome(),
                     parse_mode='html')
예제 #6
0
def llanguage(msg):
    chat = msg.chat
    base.create_user(msg.chat.id, msg.text)
    markup = telebot.types.ReplyKeyboardMarkup(True, True)
    markup.row("ok")
    str = bot.send_message(msg.chat.id,
                           base.get_text(msg.chat.id, "confirm"),
                           reply_markup=markup)
    bot.register_next_step_handler(str, welcome)
예제 #7
0
def main_menu():
    return make_markup(1, 2,True, base.get_text((12))[-1][0], base.get_text((13))[-1][0])
예제 #8
0
def select_currency(msg):
    chat = msg.chat
    bot.send_message(chat.id,
                     base.get_text(chat.id, 'currency'),
                     reply_markup=markups.currency())
예제 #9
0
def select_currency(call):
    chat = call.message.chat
    bot.edit_message_text(base.get_text(chat.id, 'currency'),
                          chat.id,
                          call.message.message_id,
                          reply_markup=markups.currency())
예제 #10
0
def currency(call):
    chat = call.message.chat
    bot.edit_message_text(base.get_text(chat.id, 'operations'),
                          chat.id,
                          call.message.message_id,
                          reply_markup=markups.menu())
예제 #11
0
def settings(msg):
    bot.send_message(msg.chat.id,
                     base.get_text(msg.chat.id, 'settings'),
                     reply_markup=markups.settings())
예제 #12
0
def wallet(msg):
    bot.send_message(msg.chat.id, "Кошелёк", reply_markup=markups.exchangeR())
    bot.send_message(msg.chat.id,
                     base.get_text(msg.chat.id, 'wallet'),
                     reply_markup=markups.wallet())
예제 #13
0
def sell(call):
    chat = call.message.chat
    bot.send_message(chat.id, "Продажа", reply_markup=markups.exchangeR())
    bot.send_message(chat.id,
                     base.get_text(chat.id, 'sellcur'),
                     reply_markup=markups.buyI_sellI())
예제 #14
0
def buy(call):
    chat = call.message.chat
    bot.send_message(chat.id, "Покупка", reply_markup=markups.exchangeR())
    bot.send_message(chat.id,
                     base.get_text(chat.id, 'buycur'),
                     reply_markup=markups.buyI_sellI())
예제 #15
0
def start_dia():
    return make_inline_markup(1, 1, base.get_text((12))[-1][0], 1)
예제 #16
0
def setings(call):
    msg = call.message
    bot.edit_message_text(base.get_text(msg.chat.id, 'settings'),
                          msg.chat.id,
                          msg.message_id,
                          reply_markup=markups.settings())
예제 #17
0
def end_markup(user_id):
    return make_markup(1, 1, True, base.get_text((14))[-1][0])
예제 #18
0
def add_request(cid):
    markup = telebot.types.InlineKeyboardMarkup()
    text = base.get_text(cid, 'add_req')
    btn = telebot.types.InlineKeyboardButton(text=text, callback_data='add request')
    markup.row(btn)
    return markup