Answer the question
In order to leave comments, you need to log in
How to call a module from a function?
It is necessary to pull out the module from the function and use it in the code
from SimpleQiwi import *
import pyqiwi
def complete(message):
chat_id = message.chat.id
age = message.text
if not age.isdigit():
msg = bot.send_message(chat_id, 'Это не номер')
bot.register_next_step_handler(msg, complete)
return
user = user_dict[chat_id]
user.age = age
f1 = types.ReplyKeyboardMarkup(True, True)
f1.row('Узнать баланс', 'Перевод средств(ТОЛЬКО QIWI)')
bot.send_message(chat_id, 'Спасибо, данные сохранены', reply_markup=f1)
wallet = pyqiwi.Wallet(token=str(user.name), number=user.age)
api = QApi(token=str(user.name), phone=user.age)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question