mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-12-23 06:50:29 +01:00
Merge branch 'master' of https://github.com/leandrotoledo/python-telegram-bot
This commit is contained in:
commit
dcea2c8015
6 changed files with 18 additions and 6 deletions
|
@ -23,6 +23,7 @@ The following wonderful people contributed directly or indirectly to this projec
|
|||
- `Noam Meltzer <https://github.com/tsnoam>`_
|
||||
- `Oleg Shlyazhko <https://github.com/ollmer>`_
|
||||
- `Rahiel Kasim <https://github.com/rahiel>`_
|
||||
- `Shelomentsev D <https://github.com/shelomentsevd>`_
|
||||
- `sooyhwang <https://github.com/sooyhwang>`_
|
||||
- `wjt <https://github.com/wjt>`_
|
||||
|
||||
|
|
1
Makefile
1
Makefile
|
@ -12,6 +12,7 @@ clean:
|
|||
find . -name '*.pyc' -exec rm -f {} \;
|
||||
find . -name '*.pyo' -exec rm -f {} \;
|
||||
find . -name '*~' -exec rm -f {} \;
|
||||
find . -regex "./telegram.\(mp3\|mp4\|ogg\|png\|webp\)" -exec rm {} \;
|
||||
|
||||
pep257:
|
||||
$(PEP257) telegram
|
||||
|
|
|
@ -36,7 +36,7 @@ A Python wrapper around the Telegram Bot API.
|
|||
:alt: Coveralls
|
||||
|
||||
.. image:: https://img.shields.io/badge/Telegram-Group-blue.svg
|
||||
:target: https://telegram.me/joinchat/ALnA-D1qVhg60vc-BgZYgA
|
||||
:target: https://telegram.me/pythontelegrambotgroup
|
||||
:alt: Telegram Group
|
||||
|
||||
=================
|
||||
|
@ -107,6 +107,7 @@ getUpdates Yes
|
|||
getUserProfilePhotos Yes
|
||||
getFile Yes
|
||||
setWebhook Yes
|
||||
answerInlineQuery Yes
|
||||
========================= ============
|
||||
|
||||
-------------------------
|
||||
|
@ -426,7 +427,7 @@ You may copy, distribute and modify the software provided that modifications are
|
|||
_`Contact`
|
||||
==========
|
||||
|
||||
Feel free to join to our `Telegram group <https://telegram.me/joinchat/ALnA-D1qVhg60vc-BgZYgA>`_.
|
||||
Feel free to join to our `Telegram group <https://telegram.me/pythontelegrambotgroup>`_.
|
||||
|
||||
=======
|
||||
_`TODO`
|
||||
|
|
|
@ -23,7 +23,7 @@ import logging
|
|||
from functools import wraps
|
||||
from inspect import getargspec
|
||||
from threading import Thread, BoundedSemaphore, Lock, Event, current_thread
|
||||
from re import match
|
||||
from re import match, split
|
||||
from time import sleep
|
||||
|
||||
from telegram import (TelegramError, Update, NullHandler)
|
||||
|
@ -548,7 +548,7 @@ class Dispatcher:
|
|||
command
|
||||
"""
|
||||
|
||||
command = update.message.text.split(' ')[0][1:].split('@')[0]
|
||||
command = split('\W', update.message.text[1:])[0]
|
||||
|
||||
if command in self.telegram_command_handlers:
|
||||
self.dispatchTo(self.telegram_command_handlers[command], update,
|
||||
|
|
|
@ -81,7 +81,8 @@ class InputFile(object):
|
|||
self.input_file_content = self.input_file.read()
|
||||
if 'filename' in data:
|
||||
self.filename = self.data.pop('filename')
|
||||
elif isinstance(self.input_file, file):
|
||||
elif isinstance(self.input_file, file) and \
|
||||
hasattr(self.input_file, 'name'):
|
||||
self.filename = os.path.basename(self.input_file.name)
|
||||
elif from_url:
|
||||
self.filename = os.path.basename(self.input_file.url)\
|
||||
|
|
|
@ -56,6 +56,10 @@ class Message(TelegramObject):
|
|||
new_chat_photo (List[:class:`telegram.PhotoSize`]):
|
||||
delete_chat_photo (bool):
|
||||
group_chat_created (bool):
|
||||
supergroup_chat_created (bool):
|
||||
migrate_to_chat_id (int):
|
||||
migrate_from_chat_id (int):
|
||||
channel_chat_created (bool):
|
||||
|
||||
Args:
|
||||
message_id (int):
|
||||
|
@ -84,6 +88,10 @@ class Message(TelegramObject):
|
|||
new_chat_photo (Optional[List[:class:`telegram.PhotoSize`]):
|
||||
delete_chat_photo (Optional[bool]):
|
||||
group_chat_created (Optional[bool]):
|
||||
supergroup_chat_created (Optional[bool]):
|
||||
migrate_to_chat_id (Optional[int]):
|
||||
migrate_from_chat_id (Optional[int]):
|
||||
channel_chat_created (Optional[bool]):
|
||||
"""
|
||||
|
||||
def __init__(self,
|
||||
|
|
Loading…
Reference in a new issue