# -*- 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 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, wait please '%message.chat.username)
if __name__ == '__main__':
bot.polling(none_stop = True)
# -*- coding: utf-8 -*-
token = 'token api'
owner = 'ownerid или же ваш id'
CHATID = '*chat id если будут проблемы с нахождением могу подсказать*'