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())
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())
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')
def start(message): chat = message.chat # welcome(msg) msg = bot.send_message(chat.id, "Select a language in the list", reply_markup=markups.language()) bot.register_next_step_handler(msg, llanguage)
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)
def select_currency(msg): chat = msg.chat bot.send_message(chat.id, base.get_text(chat.id, 'currency'), reply_markup=markups.currency())
def service(msg): bot.send_message(msg.chat.id, "Нужно придумать")
def enter_address(msg): new_address = msg bot.send_message(msg.chat.id, "Информация сохранена")
def settings(msg): bot.send_message(msg.chat.id, base.get_text(msg.chat.id, 'settings'), reply_markup=markups.settings())
def rate(msg): bot.send_message(msg.chat.id, "Курс")
def req_buy(call): msg = call.message ms = bot.send_message(msg.chat.id, "Метод оплаты", reply_markup=markups.pay_method()) bot.register_next_step_handler(ms, rate)
def user_requests(call): bot.send_message(call.message.chat.id, "Если нужно,то просто раскомменти")
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())
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())
def monero(call): chat = call.message.chat bot.send_message(chat.id, "Покупка/Продажа Monero", reply_markup=markups.payments())
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())