Answer the question
In order to leave comments, you need to log in
How to minus a variable in pytelegrambotapi?
Good day everyone!
I create a telegram bot and pytelegrambotapi
Almost did everything
There is a variable "balanc" and in it I put the number 10, in short it's like this: ballanc = 10
And I made this function for the bot
if call.data == 'four':
if balanc <= 10:
balanc - 10
bot.answer_callback_query(call.id, "Ты купил кролика")
elif balanc > 10:
bot.answer_callback_query(call.id, "У вас не достаточно денег")
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