from telebot import TeleBot
from telebot import apihelper
bot = TeleBot('токен')
bot.get_updates(allowed_updates=["channel_post"])
@bot.message_handler(content_types=['new_chat_members'])
def greeting(message):
bot.reply_to(message, 'Привет, добро пожаловать в наш канал!')
if __name__ == '__main__':
bot.polling(none_stop=True)
Optional. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)