Skip to content

Commit

Permalink
v1.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
EnriqueMoran authored Jun 12, 2020
1 parent 5124adb commit bdba711
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 9 deletions.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ python3 telegramShellBot.py & (this will run the script in backgrou
![alt tag](/readme_images/image4.png)


## Sending and receiving files
To send files just drag and drop on the chat, or click on send file button (images must be sent this way).
To download files from the computer use "getfile + path" (e.g. getfile /home/user/Desktop/test-file.txt).

![alt tag](/readme_images/gif2.gif)


## Version history
Check [project releases](https://github.com/EnriqueMoran/remoteTelegramShell/releases) for more info.
Expand All @@ -80,4 +86,12 @@ Check [project releases](https://github.com/EnriqueMoran/remoteTelegramShell/rel
- **v1.0:** (6/21/18) Official release. Critical and minor bug fixed. New forbidden commands added.
- **v1.1.2:** (3/8/19) Typo correction, top command added, Telegram API 400 Bad Request error fixed.
- **v1.2.0:** (1/25/20) Install and uninstall package infinite loop fixed, config.txt and readme modified.
- **v1.2.1:** (1/26/20) Update and upgrade system infinite loop fixed, config parameters checker added.
- **v1.2.1:** (1/26/20) Update and upgrade system infinite loop fixed, config parameters checker added.
- **v1.3.1:** (6/12/20) File sending and receiving feature added.




todo: agregar la sharedfolder
hacer que se puedan eliminar usuarios desde telegram, que salga bonito, etc
hacer que el loglimit funcione
8 changes: 4 additions & 4 deletions config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
# this file and fill the following parameters in order to correctly configure the program.


# File sharing folder - Absolute path to file sharing folder. All files sent through
# drag and drop will be stored there, dont choose a root-protected one.
shareFolder = ./shareFolder
# File sharing folder - Absolute path to file sharing folder (ending in slash). All files
# sent through drag and drop will be stored there, dont choose a root-protected one.
shareFolder = ./shareFolder/


# Version - This parameter is automatically filled. Current version will be shown on /help
# option. Please do not modify.
version = v1.3.0
version = v1.3.1


# TOKEN - This is bot auth token, necessary to connect bot to Telegram device.
Expand Down
Binary file added readme_images/gif2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions telegramShellBot.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ def checkConfig(message):
if ROOT == "":
error = True
error_msg += "\n- Root field is empty."
bot.send_message(message.chat.id, error_msg)
if error:
bot.send_message(message.chat.id, error_msg)
return error


Expand Down Expand Up @@ -410,10 +411,10 @@ def run(message):
def saveDoc(doc):
fileInfo = bot.get_file(doc.document.file_id)
downloadedFile = bot.download_file(fileInfo.file_path)
filepath = SHAREFOLDER + '\\' + doc.document.file_name
with open(filepath, 'wb') as newFile:
filePath = SHAREFOLDER + doc.document.file_name
with open(filePath, 'wb') as newFile:
newFile.write(downloadedFile)
bot.send_message(message.chat.id,"File received.")
bot.send_message(doc.chat.id,f"File saved as {filePath}")

@bot.message_handler(content_types=['photo'])
def savePhoto(doc):
Expand Down

0 comments on commit bdba711

Please sign in to comment.