Commit 62c45a45 authored by Danial Behzadi's avatar Danial Behzadi
Browse files

update to latest pyrogram api

parent 83d8b75b
...@@ -6,7 +6,7 @@ To make it work, do the following: ...@@ -6,7 +6,7 @@ To make it work, do the following:
$ git clone https://gitlab.com/danialbehzadi/tgchannel2toot.git $ git clone https://gitlab.com/danialbehzadi/tgchannel2toot.git
$ cd tgchannel2toot $ cd tgchannel2toot
$ virtualenv -p python3 --no-site-packages --distribute .env $ python3 -m venv .env
$ source .env/bin/activate $ source .env/bin/activate
(.env)$ pip3 install -r requirements.txt (.env)$ pip3 install -r requirements.txt
......
#! /usr/bin/env python3 #!/usr/bin/python3
# Danial Behzadi - 2018 # Released under GPLv3+ License
# Released under GPLV3+ # Danial Behazdi <dani.behzi@ubuntu.com>, 2018-2021
import config import config
import os import os
from pyrogram import Client from pyrogram import Client, idle
from mastodon import Mastodon from mastodon import Mastodon
def get_text_and_media(message): def get_text_and_media(message):
...@@ -43,7 +43,7 @@ def main(): ...@@ -43,7 +43,7 @@ def main():
mastodon.toot(text) mastodon.toot(text)
telegram.start() telegram.start()
telegram.idle() idle()
if __name__ == '__main__': if __name__ == '__main__':
main() main()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment