Dr.Caduceus commited on
Commit
24a3769
·
unverified ·
1 Parent(s): eeec368

Bump to v1.3

Browse files
Files changed (1) hide show
  1. bot/modules/telegram.py +2 -2
bot/modules/telegram.py CHANGED
@@ -5,7 +5,6 @@ from bot import TelegramBot
5
  from bot.config import Telegram
6
  from bot.server.error import abort
7
 
8
-
9
  async def get_message(message_id: int):
10
  message = None
11
 
@@ -39,6 +38,7 @@ async def get_file_properties(msg: Message):
39
  if not media: abort(400, 'Unknown file type.')
40
 
41
  file_name = getattr(media, 'file_name', None)
 
42
 
43
  if not file_name:
44
  file_format = {
@@ -53,4 +53,4 @@ async def get_file_properties(msg: Message):
53
 
54
  mime_type = guess_type(file_name)[0] or 'application/octet-stream'
55
 
56
- return file_name, mime_type
 
5
  from bot.config import Telegram
6
  from bot.server.error import abort
7
 
 
8
  async def get_message(message_id: int):
9
  message = None
10
 
 
38
  if not media: abort(400, 'Unknown file type.')
39
 
40
  file_name = getattr(media, 'file_name', None)
41
+ file_size = getattr(media, 'file_size', 0)
42
 
43
  if not file_name:
44
  file_format = {
 
53
 
54
  mime_type = guess_type(file_name)[0] or 'application/octet-stream'
55
 
56
+ return file_name, file_size, mime_type