Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/SlavikMIPT/opentfd
Browse files Browse the repository at this point in the history
# Conflicts:
#	opentfd.py
  • Loading branch information
SlavikMIPT committed Oct 16, 2018
2 parents 921d4c2 + f5bb0aa commit abe4406
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# OpenTFD
* Merges series of Telegram messages if there is a pause of less than 30 seconds between them
* Integrated Google Translator (just put /en in the end of message to translate into English or /ru to translate into russian). Full list of supported languages you can see in supported_langs at opentfd.py
* Bash assistant - type '!bash command' in any chat to execute command on your host

Compiled versions is on [releases of this repo](https://github.com/SlavikMIPT/opentfd/releases/tag/win-proxy-1.2)

Expand Down
7 changes: 5 additions & 2 deletions opentfd.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
MERGE_TIMEOUT = 30
merge_semaphore = asyncio.Semaphore(value=1)


async def delete_messages():
messages = await client.get_messages(entity, limit=10)


async def run_command_shell(cmd, e):
process = await asyncio.create_subprocess_shell(
cmd,
Expand Down Expand Up @@ -159,8 +164,6 @@ async def merger(event):
else:
last_msg = event
last_msg_time = event_time


print("OpenTFD is running")
print("Do not close this window")
print("t.me/mediatube_stream")
Expand Down

0 comments on commit abe4406

Please sign in to comment.