mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
11 lines
338 B
Python
11 lines
338 B
Python
|
import telebot
|
||
|
|
||
|
|
||
|
bot = telebot.TeleBot('TOKEN')
|
||
|
|
||
|
@bot.chat_join_request_handler()
|
||
|
def make_some(message: telebot.types.ChatJoinRequest):
|
||
|
bot.send_message(message.chat.id, 'I accepted a new user!')
|
||
|
bot.approve_chat_join_request(message.chat.id, message.from_user.id)
|
||
|
|
||
|
bot.infinity_polling(allowed_updates=telebot.util.update_types)
|