mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
13 lines
345 B
Python
13 lines
345 B
Python
import telebot
|
|
from telebot import custom_filters
|
|
bot = telebot.TeleBot('TOKEN')
|
|
|
|
# Handler
|
|
@bot.message_handler(chat_types=['supergroup'], is_chat_admin=True)
|
|
def answer_for_admin(message):
|
|
bot.send_message(message.chat.id,"hello my admin")
|
|
|
|
# Register filter
|
|
bot.add_custom_filter(custom_filters.IsAdminFilter(bot))
|
|
bot.infinity_polling()
|