How to Solve NameError: name 'PeerChat' is not defined -- telethon
Solution: Import the 'PeerChat' module
To Solve the error, add the following line to the top of your code.
from telethon import PeerChat
For more information:
Python telethon PeerChat