Не работает TelgramBOT, в ошибке написано что не хватает аргумент. Какого аргумента??
Вот код:
import os
import telebot
from telebot import types
bot = telebot.TeleBot('##################')
@bot.message_handler(commands=['start'])
def opens_files():
with open("tasklim", "r") as file:
for line in file:
qs = line.replace('Ќ/„', '')
q1 = qs.replace('‘«г¦Ўл:', '')
q2 = q1.replace('PID:', '')
q3 = q2.replace('€¬п ®Ўа § :', '')
q4 = q3.replace('‘«г¦Ўл: Ќ/„', '')
q5 = q4.replace('1', '')
q6 = q5.replace('2', '')
q7 = q6.replace('3', '')
q8 = q7.replace('4', '')
q9 = q8.replace('5', '')
q01 = q9.replace('6', '')
q02 = q01.replace('7', '')
q03 = q02.replace('8', '')
q04 = q03.replace('9', '')
q05 = q04.replace('0', '')
q06 = q05.replace(' ', '')
q07 = q06.replace('\n', '')
logs = q07.replace('.exe', '.exe\n\n')
bot.send_message(chat_id='123456789', text=logs)
if __name__ == '__main__':
bot.polling(none_stop=True)
Вот лог из консоли:
TypeError: opens_files() takes 0 positional arguments but 1 was given