import telebot
import time
import requests
import sqlite3
import config as cfg
import markups as nav
from db import Database
from telebot import types
db = sqlite3.connect('daatabase.db')
top_up = types.InlineKeyboardMarkup(row_width = 1)
top_up_menu = types.InlineKeyboardButton('Пополнить', callback_data = 'top_up')
top_up.add(top_up_menu)
bot = telebot.TeleBot("1234567890")
@bot.message_handler(commands = ['start'])
def start(message):
bot.send_message(message.chat.id, 'dg')
if not db.user_exists(message.from_user.id):
db.add_user(message.from_user.id)
bot.send_message(message.chat.id, f"dobro pozalywat \nsen pulun: {db.user_money(message.chat.id)} rub", reply_markup = top_up)
@bot.callback_query_handler(func=lambda call: True)
def callback_function1(call):
if call.message:
if call.data == 'top_up':
bot.send_message(call.message.chat.id, 'Укажите сумму пополнение' )
bot.polling(none_stop = True, interval = 0)