File tree Expand file tree Collapse file tree 4 files changed +24
-9
lines changed Expand file tree Collapse file tree 4 files changed +24
-9
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,12 @@ python3 telegramShellBot.py & (this will run the script in backgrou
68
68
![ alt tag] ( /readme_images/image4.png )
69
69
70
70
71
+ ## Sending and receiving files
72
+ To send files just drag and drop on the chat, or click on send file button (images must be sent this way).
73
+ To download files from the computer use "getfile + path" (e.g. getfile /home/user/Desktop/test-file.txt).
74
+
75
+ ![ alt tag] ( /readme_images/gif2.gif )
76
+
71
77
72
78
## Version history
73
79
Check [ project releases] ( https://github.com/EnriqueMoran/remoteTelegramShell/releases ) for more info.
@@ -80,4 +86,12 @@ Check [project releases](https://github.com/EnriqueMoran/remoteTelegramShell/rel
80
86
- ** v1.0:** (6/21/18) Official release. Critical and minor bug fixed. New forbidden commands added.
81
87
- ** v1.1.2:** (3/8/19) Typo correction, top command added, Telegram API 400 Bad Request error fixed.
82
88
- ** v1.2.0:** (1/25/20) Install and uninstall package infinite loop fixed, config.txt and readme modified.
83
- - ** v1.2.1:** (1/26/20) Update and upgrade system infinite loop fixed, config parameters checker added.
89
+ - ** v1.2.1:** (1/26/20) Update and upgrade system infinite loop fixed, config parameters checker added.
90
+ - ** v1.3.1:** (6/12/20) File sending and receiving feature added.
91
+
92
+
93
+
94
+
95
+ todo: agregar la sharedfolder
96
+ hacer que se puedan eliminar usuarios desde telegram, que salga bonito, etc
97
+ hacer que el loglimit funcione
Original file line number Diff line number Diff line change 5
5
# this file and fill the following parameters in order to correctly configure the program.
6
6
7
7
8
- # File sharing folder - Absolute path to file sharing folder. All files sent through
9
- # drag and drop will be stored there, dont choose a root-protected one.
10
- shareFolder = ./shareFolder
8
+ # File sharing folder - Absolute path to file sharing folder (ending in slash) . All files
9
+ # sent through drag and drop will be stored there, dont choose a root-protected one.
10
+ shareFolder = ./shareFolder/
11
11
12
12
13
13
# Version - This parameter is automatically filled. Current version will be shown on /help
14
14
# option. Please do not modify.
15
- version = v1.3.0
15
+ version = v1.3.1
16
16
17
17
18
18
# TOKEN - This is bot auth token, necessary to connect bot to Telegram device.
Original file line number Diff line number Diff line change @@ -115,7 +115,8 @@ def checkConfig(message):
115
115
if ROOT == "" :
116
116
error = True
117
117
error_msg += "\n - Root field is empty."
118
- bot .send_message (message .chat .id , error_msg )
118
+ if error :
119
+ bot .send_message (message .chat .id , error_msg )
119
120
return error
120
121
121
122
@@ -410,10 +411,10 @@ def run(message):
410
411
def saveDoc (doc ):
411
412
fileInfo = bot .get_file (doc .document .file_id )
412
413
downloadedFile = bot .download_file (fileInfo .file_path )
413
- filepath = SHAREFOLDER + ' \\ ' + doc .document .file_name
414
- with open (filepath , 'wb' ) as newFile :
414
+ filePath = SHAREFOLDER + doc .document .file_name
415
+ with open (filePath , 'wb' ) as newFile :
415
416
newFile .write (downloadedFile )
416
- bot .send_message (message .chat .id ,"File received. " )
417
+ bot .send_message (doc .chat .id ,f "File saved as { filePath } " )
417
418
418
419
@bot .message_handler (content_types = ['photo' ])
419
420
def savePhoto (doc ):
You can’t perform that action at this time.
0 commit comments