import telegram
import config
bot = telegram.Bot(config.token)
chat_id = '@юзернейм чата'
chat_text = 'some text'
bot.send_message(chat_id=chat_id, text=chat_text)
bot.polling(none_stop=True)
$ python bot.py
Traceback (most recent call last):
File "bot.py", line 10, in <module>
bot.polling(none_stop=True)
AttributeError: 'Bot' object has no attribute 'polling'