79090691

Date: 2024-10-15 15:35:06
Score: 1
Natty:
Report link

Returns an error with this code: bot = telebot.TeleBot(token)

@bot.message_handler(commands=['start','starting']) def feed(bot, update): # send reply to the user bot.send_message(chat_id=update.message.chat_id, text='reply this message') # forward user message to group # note: group ID with the negative sign bot.forward_message(chat_id='-1002462475647', from_chat_id=update.message.chat_id, message_id=update.message.message_id) bot.polling(none_stop=True),

here is the error: TypeError: feed() missing 1 required positional argument: 'update'

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Hannea