Ранее код запускался,и сейчас запускается и все норм работает вроде,но текст очень сильно мусолит глаза тк некоторые уведомления выводятся в терминал.
Ошибка:
2023-02-27 14:13:47,772 (__init__.py:5297 MainThread) ERROR - TeleBot: "message_handler: Commands filter should be list of strings (commands), unknown type supplied to the 'commands' filter list. Not able to use the supplied type."
ошибок много.но они похожие
Кода много 1.5к строк,но эти ошибки именно в моментах c bot.message_handler
@bot.message_handler(commands='kz_5'
def kz_5(message):
bw = message.chat.id
bot.send_message(message.chat.id, ''
connect = sqlite3.connect('kazino.db'
cursor = connect.cursor()
r = cursor.execute(f"""SELECT user_id FROM тт WHERE user_id == ?""", (f'{bw}',)).fetchone()
if r is None:
bot.send_message(message.chat.id, ''.replace('(' ''.replace('' ''.replace(',' ''
else:
r = cursor.execute(f"""SELECT kz_5 FROM you WHERE user_id = {bw}""".fetchall()
for ab in r:
ab = int(ab[0])
if ab >= 1:
for a in r:
a = a[0]
bot.send_message(message.chat.id, f'txt'
cursor.execute(f"""UPDATE txt SET kz_4 = kz_4 - 1 WHERE user_id = {bw}"""
connect.commit()
bot.send_message(message.chat.id, 'txt'
time.sleep(1)
bot.send_message(message.chat.id, '5'
time.sleep(1)
bot.send_message(message.chat.id, '4'
time.sleep(1)
bot.send_message(message.chat.id, '3'
time.sleep(1)
bot.send_message(message.chat.id, '2'
time.sleep(1)
bot.send_message(message.chat.id, '1'
time.sleep(1)
bot.send_message(message.chat.id, 'txt'
time.sleep(5)
win = random.randint(1000, 1100000)
if win >= 100000:
cursor.execute(f"""UPDATE txt SET bal = bal + {win} WHERE user_id = {bw}"""
connect.commit()
bot.send_message(message.chat.id, f'txtl**'
rb = cursor.execute(f"""SELECT bal FROM txt""".fetchall()
for rbal in rb:
rbal = rbal[0]
bot.send_message(message.chat.id, f'txt'
elif win <= 95000:
cursor.execute(f"""UPDATE txt SET bal = bal + {win} WHERE user_id = {bw}"""
connect.commit()
bot.send_message(message.chat.id, f'txt' 'txt'
rb = cursor.execute(f"""SELECT bal FROM txt WHERE user_id = {bw}""".fetchall()
for rbal in rb:
rbal = rbal[0]
bot.send_message(message.chat.id, f'txt'
print(f'txt'
немного все сьехало,но думаю видно будеи
Ошибка:
2023-02-27 14:13:47,772 (__init__.py:5297 MainThread) ERROR - TeleBot: "message_handler: Commands filter should be list of strings (commands), unknown type supplied to the 'commands' filter list. Not able to use the supplied type."
ошибок много.но они похожие
Кода много 1.5к строк,но эти ошибки именно в моментах c bot.message_handler
@bot.message_handler(commands='kz_5'
def kz_5(message):
bw = message.chat.id
bot.send_message(message.chat.id, ''
connect = sqlite3.connect('kazino.db'
cursor = connect.cursor()
r = cursor.execute(f"""SELECT user_id FROM тт WHERE user_id == ?""", (f'{bw}',)).fetchone()
if r is None:
bot.send_message(message.chat.id, ''.replace('(' ''.replace('' ''.replace(',' ''
else:
r = cursor.execute(f"""SELECT kz_5 FROM you WHERE user_id = {bw}""".fetchall()
for ab in r:
ab = int(ab[0])
if ab >= 1:
for a in r:
a = a[0]
bot.send_message(message.chat.id, f'txt'
cursor.execute(f"""UPDATE txt SET kz_4 = kz_4 - 1 WHERE user_id = {bw}"""
connect.commit()
bot.send_message(message.chat.id, 'txt'
time.sleep(1)
bot.send_message(message.chat.id, '5'
time.sleep(1)
bot.send_message(message.chat.id, '4'
time.sleep(1)
bot.send_message(message.chat.id, '3'
time.sleep(1)
bot.send_message(message.chat.id, '2'
time.sleep(1)
bot.send_message(message.chat.id, '1'
time.sleep(1)
bot.send_message(message.chat.id, 'txt'
time.sleep(5)
win = random.randint(1000, 1100000)
if win >= 100000:
cursor.execute(f"""UPDATE txt SET bal = bal + {win} WHERE user_id = {bw}"""
connect.commit()
bot.send_message(message.chat.id, f'txtl**'
rb = cursor.execute(f"""SELECT bal FROM txt""".fetchall()
for rbal in rb:
rbal = rbal[0]
bot.send_message(message.chat.id, f'txt'
elif win <= 95000:
cursor.execute(f"""UPDATE txt SET bal = bal + {win} WHERE user_id = {bw}"""
connect.commit()
bot.send_message(message.chat.id, f'txt' 'txt'
rb = cursor.execute(f"""SELECT bal FROM txt WHERE user_id = {bw}""".fetchall()
for rbal in rb:
rbal = rbal[0]
bot.send_message(message.chat.id, f'txt'
print(f'txt'
немного все сьехало,но думаю видно будеи