0

I need to create a program to run multiple bots via telebot. How to remove this error?

code

def start_bot(*args):
    token = a.bot_token.split()[0]
    bot = telebot.TeleBot(token)
    @bot.message_handler(commands=['start'])
    async def start_fun(message):
        bot.send_message( message.chat.id, 'message', parse_mode="Markdown", reply_markup=webAppKeyboard())
    bot.infinity_polling()

ERROR

C:\Users\admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\telebot\util.py:100: RuntimeWarning: coroutine 'start_bot.<locals>.start_fun' was never awaited
  task(*args, **kwargs)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback

1 Answers1

0

Try using asyncio

For more more info see