How can I get information from telegram about new users joining my group, I want it to record on a spreadsheet of the member name and who he/she invited into the group. Is there a way for me to do this?
I try to look at some Telegram API in https://core.telegram.org/bots/api but it didn’t really help me at all.
2
Answers
When a members joins a group, you’ll receice a
Message
update, withnew_chat_members
set.If you’re using the
python-telegram-bot
library (which I assume, as you used the tag), you can filters for those updates by adding aMessageHandler(Filters.new_chat_members, ...)
.You can use message Filters to trigger a function when a new user joins the group
Example
When a user joins the group this bot will leave a reply "New user joined."