You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
455 B
20 lines
455 B
#!/usr/bin/python3
|
|
|
|
import telebot
|
|
import subprocess
|
|
import sys
|
|
sys.path.append("ddbot_config")
|
|
import config_ddbot as i
|
|
|
|
bank = i.botBank
|
|
ddusr = "sqlite3 " + bank + ".db.sqlite " + "'select balance from balance1 where id = '1';'"
|
|
ddamt = str(subprocess.check_output(ddusr, shell=True))[2:-3]
|
|
|
|
bot = telebot.TeleBot(i.botToken)
|
|
|
|
@bot.message_handler(commands=['ddbank'])
|
|
def send_ddbank(message):
|
|
bot.reply_to(message, ddamt)
|
|
|
|
bot.infinity_polling()
|