Вроде так должно работать. Мне вроде так нужно сделать
# -*- coding: utf-8 -*-
token = 'Токен от
@FatherBot'
owner = '***'
сохранить файл как
config.py# -*- 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, 'Привет. \n\n Write /help fro help.')
@bot.message_handler(commands=["help"])
def start(message):
bot.send_message(
message.chat.id, 'Help message😈')
@bot.message_handler(content_types=["Текст бота"])
def messages(message):
if int(
message.chat.id) == int(config.owner):
try:
chatId=message.text.split(': ')[0]
text=message.text.split(': ')[1]
bot.send_message(chatId, text)
except:
pass
else:
bot.send_message(config.owner, str(
message.chat.id) + ': ' + message.text)
bot.send_message(
message.chat.id, '%s, wait please 👍'%message.chat.username)
if @Канал1;@Канал2 == '@Канал3':
bot.polling(none_stop = True)
указать chat_id и сохранить все это в файле .by
Потом на Linux sudo pip install pytelegrambotapi и с помощью python запустить последний файл.