SpecialistOff.NET / Вопросы / Статьи / Фрагменты кода / Резюме / Метки / Помощь / Файлы
Список вопросов Печать| RemiZOffAlex Создано: 2018-04-02 11:40:26.843713 Обновлено: 2018-04-02 11:40:26.843713 |
|---|
|
Пакет pip3 install pytelegrambotapi Пример кода
import telebot
API_TOKEN = 'bla'
TELEGRAM_CHANNEL = 'bla-bla'
bot = telebot.TeleBot(API_TOKEN)
@bot.message_handler(commands=['help'])
def send_help(message):
bot.reply_to(message, """
/help Показать описание команд
""")
bot.polling()
bot.send_message(
TELEGRAM_CHANNEL,
question.title + ': http://specialistoff.net/question/' + str(id)
)
|