Skip to content

Commit dcea2c8

Browse files
committed
2 parents 98112d3 + 45a4689 commit dcea2c8

File tree

6 files changed

+18
-6
lines changed

6 files changed

+18
-6
lines changed

AUTHORS.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ The following wonderful people contributed directly or indirectly to this projec
2323
- `Noam Meltzer <https://github.com/tsnoam>`_
2424
- `Oleg Shlyazhko <https://github.com/ollmer>`_
2525
- `Rahiel Kasim <https://github.com/rahiel>`_
26+
- `Shelomentsev D <https://github.com/shelomentsevd>`_
2627
- `sooyhwang <https://github.com/sooyhwang>`_
2728
- `wjt <https://github.com/wjt>`_
2829

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ clean:
1212
find . -name '*.pyc' -exec rm -f {} \;
1313
find . -name '*.pyo' -exec rm -f {} \;
1414
find . -name '*~' -exec rm -f {} \;
15+
find . -regex "./telegram.\(mp3\|mp4\|ogg\|png\|webp\)" -exec rm {} \;
1516

1617
pep257:
1718
$(PEP257) telegram

README.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ A Python wrapper around the Telegram Bot API.
3636
:alt: Coveralls
3737

3838
.. image:: https://img.shields.io/badge/Telegram-Group-blue.svg
39-
:target: https://telegram.me/joinchat/ALnA-D1qVhg60vc-BgZYgA
39+
:target: https://telegram.me/pythontelegrambotgroup
4040
:alt: Telegram Group
4141

4242
=================
@@ -107,6 +107,7 @@ getUpdates Yes
107107
getUserProfilePhotos Yes
108108
getFile Yes
109109
setWebhook Yes
110+
answerInlineQuery Yes
110111
========================= ============
111112

112113
-------------------------
@@ -426,7 +427,7 @@ You may copy, distribute and modify the software provided that modifications are
426427
_`Contact`
427428
==========
428429

429-
Feel free to join to our `Telegram group <https://telegram.me/joinchat/ALnA-D1qVhg60vc-BgZYgA>`_.
430+
Feel free to join to our `Telegram group <https://telegram.me/pythontelegrambotgroup>`_.
430431

431432
=======
432433
_`TODO`

telegram/ext/dispatcher.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
from functools import wraps
2424
from inspect import getargspec
2525
from threading import Thread, BoundedSemaphore, Lock, Event, current_thread
26-
from re import match
26+
from re import match, split
2727
from time import sleep
2828

2929
from telegram import (TelegramError, Update, NullHandler)
@@ -548,7 +548,7 @@ def dispatchTelegramCommand(self, update, context=None):
548548
command
549549
"""
550550

551-
command = update.message.text.split(' ')[0][1:].split('@')[0]
551+
command = split('\W', update.message.text[1:])[0]
552552

553553
if command in self.telegram_command_handlers:
554554
self.dispatchTo(self.telegram_command_handlers[command], update,

telegram/inputfile.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ def __init__(self,
8181
self.input_file_content = self.input_file.read()
8282
if 'filename' in data:
8383
self.filename = self.data.pop('filename')
84-
elif isinstance(self.input_file, file):
84+
elif isinstance(self.input_file, file) and \
85+
hasattr(self.input_file, 'name'):
8586
self.filename = os.path.basename(self.input_file.name)
8687
elif from_url:
8788
self.filename = os.path.basename(self.input_file.url)\
@@ -134,7 +135,7 @@ def to_form(self):
134135
form_boundary,
135136
'Content-Disposition: form-data; name="%s"; filename="%s"' % (
136137
self.input_name, self.filename
137-
),
138+
),
138139
'Content-Type: %s' % self.mimetype,
139140
'',
140141
self.input_file_content

telegram/message.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ class Message(TelegramObject):
5656
new_chat_photo (List[:class:`telegram.PhotoSize`]):
5757
delete_chat_photo (bool):
5858
group_chat_created (bool):
59+
supergroup_chat_created (bool):
60+
migrate_to_chat_id (int):
61+
migrate_from_chat_id (int):
62+
channel_chat_created (bool):
5963
6064
Args:
6165
message_id (int):
@@ -84,6 +88,10 @@ class Message(TelegramObject):
8488
new_chat_photo (Optional[List[:class:`telegram.PhotoSize`]):
8589
delete_chat_photo (Optional[bool]):
8690
group_chat_created (Optional[bool]):
91+
supergroup_chat_created (Optional[bool]):
92+
migrate_to_chat_id (Optional[int]):
93+
migrate_from_chat_id (Optional[int]):
94+
channel_chat_created (Optional[bool]):
8795
"""
8896

8997
def __init__(self,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy