exclam: !upl: Add support for HTTP/HTTPS URL for file upload
patch d523591db91c8bf0ceb6ea65bac6358e5080f35a
Author: E. Bosch <presidev@AT@gmail.com>
Date: Sun Apr 21 20:59:04 CEST 2024
* exclam: !upl: Add support for HTTP/HTTPS URL for file upload
hunk ./exclam.py 150
- file_path = os.path.join(self.tg.telegram_upload_dir, file)
+ if file[:8] == 'https://' or file[:7] == 'http://':
+ file_path = file
+ else:
+ file_path = os.path.join(self.tg.telegram_upload_dir, file)
hunk ./exclam.py 163
- ' !upl <file name> [<optional caption>]',
- 'Upload the file referenced by <file name> to current ',
+ ' !upl <file name/URL> [<optional caption>]',
+ 'Upload the file referenced by <file name/URL> to current',
hunk ./exclam.py 166
- 'local directory.'
+ 'irgramd local directory or be an external HTTP/HTTPS URL.'