As telegram bot sees and reads the messages?

Write bot python library telebot,the functionality is similar to https://telega.one/redirectsbot but very pared down. Interested in how the bot reads a telegram message. If you write the bot a certain number of posts,how to make it in turn read them(that is, saw them and then with them you can interact)?
April 4th 20 at 12:56
1 answer
April 4th 20 at 12:58
As I understand the question you are interested here it is. If not - describe in detail your question.
Not what we need. In short, the bot needs to collect the messages (of any length) and send them one at a time - howard.Ankunding commented on April 4th 20 at 13:01
@howard.Ankunding, send where? - Davon_Daugher commented on April 4th 20 at 13:04
@Davon_Daugherin another chat room or user. In General,inside telegram - howard.Ankunding commented on April 4th 20 at 13:07
@howard.Ankundingcan code to show? - Davon_Daugher commented on April 4th 20 at 13:10
@Davon_Daugher,
Here is the code.But he only sends messages to their one conversation to another(immediately). Not my code(partly rewritten),there may be errors.

# -*- coding: utf-8 -*-
import config
import telebot
from telebot import types

bot = telebot.TeleBot(config.token)



@bot.message_handler(commands=["start"])
def start(message):
 bot.send_message(message.chat.id, 'Hello. \n\n Write /help fro the help.')

@bot.message_handler(commands=["help"])
def start(message):
 bot.send_message(message.chat.id, 'Help message')







@bot.message_handler(content_types=['text'])
def messages(message):
 if int(message.chat.id) == int(config.owner):
try:
 #chatId=message.text.split(': ')[0]
text=message.text
bot.send_message(text)
except:
pass
else:
bot.send_message(config.CHATID,message.text)
 #bot.send_message(message.chat.id, '%s, please wait '%message.chat.username)

if __name__ == '__main__':
 bot.polling(none_stop = True)

Need 2 file name :"config.py" and with this code inside:
# -*- coding: utf-8 -*-
token = 'token ' api'
owner = 'ownerid or your id'
CHATID = '*chat id, if there are problems with finding can you tell*'
- howard.Ankunding commented on April 4th 20 at 13:13

Find more questions by tags PythonBotsTelegram