Compare commits

...

2 Commits

Author SHA1 Message Date
Badiboy 6459f13f25
Merge pull request #1927 from Badiboy/master
New content types added + typo fix
2023-02-22 09:51:22 +03:00
Badiboy c9b6d3f868 New content types added + typo fix 2023-02-22 09:49:29 +03:00
4 changed files with 8 additions and 9 deletions

View File

@ -191,7 +191,7 @@ class TeleBot:
coloredlogs.install(logger=logger, level=logger.level)
except ImportError:
raise ImportError(
'Install colorredlogs module to use colorful_logs option.'
'Install coloredlogs module to use colorful_logs option.'
)
# threading-related

View File

@ -139,7 +139,7 @@ class AsyncTeleBot:
coloredlogs.install(logger=logger, level=logger.level)
except ImportError:
raise ImportError(
'Install colorredlogs module to use colorful_logs option.'
'Install coloredlogs module to use colorful_logs option.'
)
# properties

View File

@ -173,14 +173,14 @@ async def get_file_url(token, file_id):
if FILE_URL is None:
return "https://api.telegram.org/file/bot{0}/{1}".format(token, (await get_file(token, file_id))['file_path'])
else:
# noinspection PyUnresolvedReferences
return FILE_URL.format(token, (await get_file(token, file_id))['file_path'])
async def download_file(token, file_path):
if FILE_URL is None:
url = "https://api.telegram.org/file/bot{0}/{1}".format(token, file_path)
else: url = FILE_URL.format(token, file_path)
else:
url = FILE_URL.format(token, file_path)
session = await session_manager.get_session()
async with session.get(url, proxy=proxy) as response:
if response.status != 200:

View File

@ -35,11 +35,10 @@ content_type_media = [
#: Contains all service content types such as `User joined the group`.
content_type_service = [
'new_chat_members', 'left_chat_member', 'new_chat_title', 'new_chat_photo', 'delete_chat_photo',
'group_chat_created',
'supergroup_chat_created', 'channel_chat_created', 'migrate_to_chat_id', 'migrate_from_chat_id', 'pinned_message',
'proximity_alert_triggered', 'video_chat_scheduled', 'video_chat_started', 'video_chat_ended',
'video_chat_participants_invited', 'message_auto_delete_timer_changed', 'forum_topic_created', 'forum_topic_closed',
'forum_topic_reopened',
'group_chat_created', 'supergroup_chat_created', 'channel_chat_created', 'migrate_to_chat_id',
'migrate_from_chat_id', 'pinned_message', 'proximity_alert_triggered', 'video_chat_scheduled', 'video_chat_started',
'video_chat_ended', 'video_chat_participants_invited', 'message_auto_delete_timer_changed', 'forum_topic_created',
'forum_topic_closed', 'forum_topic_reopened', 'user_shared', 'chat_shared',
]
#: All update types, should be used for allowed_updates parameter in polling.