-3

I'm Creating A Telegram Bot Using Python-Telegram-Bot I need to know the group username or chatname so that I can code such a way to my bot only work in my group. How do I get a group username or chatname using python? I just do like this let's say my Telegram group name 'A'

if chatname=='A':
     #do something

let's say my Telegram group username @abc

if usename=='abc':
       #do something

Is there any way to get a group username or chatname in python telebot?

happy
  • 1
  • 1

1 Answers1

0
update.message.chat.title

This will return Title, for supergroups, channels and group chats