andreiregiani / termgram Goto Github PK
View Code? Open in Web Editor NEWFriendly terminal-based Telegram client
License: GNU General Public License v3.0
Friendly terminal-based Telegram client
License: GNU General Public License v3.0
Show in message logs events like "new pinned message", "new user added", etc.
Handle these events here:
app.event_polling(update)
P.S.
A base implementation for these events were done on "show recent history" but not finished:
app.on_selected_chatroom(event, entity):
https://github.com/Hackermen/termgram/blob/master/termgram/app.py#L195
Notification messages must appear in history (recent chat) and in the event polling.
After opening a private conversation with personX
, I started to receive messages from that same person but that came from the group instead.
The expected behavior is: when you open a conversation with somebody, you should only receive message from that conversation only.
I am new at using Linux (and GitHub btw too), so probably do not understand something important, but i do not know what exactly.
I am using Manjaro Linux. Command sudo pip3 install -r requirements.txt leads to next output:
``
`Requirement already satisfied: pyaes==1.6.1 in /usr/lib/python3.10/site-packages (from -r requirements.txt (line 1)) (1.6.1)
Collecting pyasn1==0.3.7
Using cached pyasn1-0.3.7-py2.py3-none-any.whl (63 kB)
Collecting rsa==3.4.2
Using cached rsa-3.4.2-py2.py3-none-any.whl (46 kB)
Collecting Telethon==0.15.5
Using cached Telethon-0.15.5-py3-none-any.whl (236 kB)
Collecting urwid==1.3.1
Using cached urwid-1.3.1.tar.gz (588 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [26 lines of output]
Traceback (most recent call last):
File "/tmp/pip-build-env-tze4tq4j/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 147, in setup
_setup_distribution = dist = klass(attrs)
File "/tmp/pip-build-env-tze4tq4j/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 488, in __init__
_Distribution.__init__(
File "/tmp/pip-build-env-tze4tq4j/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 283, in __init__
self.finalize_options()
File "/tmp/pip-build-env-tze4tq4j/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 912, in finalize_options
ep(self)
File "/tmp/pip-build-env-tze4tq4j/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 932, in _finalize_setup_keywords
ep.load()(self, ep.name, value)
File "/tmp/pip-build-env-tze4tq4j/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 330, in invalid_unless_false
raise DistutilsSetupError(f"{attr} is invalid.")
distutils.errors.DistutilsSetupError: use_2to3 is invalid.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 85, in <module>
File "/tmp/pip-build-env-tze4tq4j/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 108, in setup
return distutils.core.setup(**attrs)
File "/tmp/pip-build-env-tze4tq4j/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 152, in setup
raise SystemExit("error in {} setup command: {}".format(attrs['name'], msg))
SystemExit: error in urwid setup command: use_2to3 is invalid.
Couldn't build the extension module, trying without it...
error in urwid setup command: use_2to3 is invalid.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
``
When i am trying to start up termgram, i get next error:
Traceback (most recent call last):
File "/usr/local/bin/termgram", line 6, in <module>
app.run()
File "/home/andronik/termgram/termgram/app.py", line 34, in run
init()
File "/home/andronik/termgram/termgram/app.py", line 48, in init
client = telethon.TelegramClient(config.SESSION_FILE, config.TELEGRAM_ID, config.TELEGRAM_HASH, update_workers=1)
TypeError: TelegramBaseClient.__init__() got an unexpected keyword argument 'update_workers'
Use :
prefix to run commands. Example:
:help
prints (on message logs) list of available commands (dynamically, not hardcoded?):clear
clear message logsA declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.