X Tutup
Skip to content

Commit 67b98e3

Browse files
authored
Merge pull request python-telegram-bot#433 from PH89/october3
small fix for game related parts
2 parents bfb4c63 + e672625 commit 67b98e3

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

AUTHORS.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ The following wonderful people contributed directly or indirectly to this projec
2727
- `Noam Meltzer <https://github.com/tsnoam>`_
2828
- `Oleg Shlyazhko <https://github.com/ollmer>`_
2929
- `overquota <https://github.com/overquota>`_
30+
- `Patrick Hofmann <https://github.com/PH89>`_
3031
- `Rahiel Kasim <https://github.com/rahiel>`_
3132
- `Shelomentsev D <https://github.com/shelomentsevd>`_
3233
- `sooyhwang <https://github.com/sooyhwang>`_

telegram/bot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ def sendGame(self,
776776
:class:`telegram.TelegramError`
777777
778778
"""
779-
url = '{0}/sendMessage'.format(self.base_url)
779+
url = '{0}/sendGame'.format(self.base_url)
780780

781781
data = {'chat_id': chat_id, 'game_short_name': game_short_name}
782782

telegram/callbackquery.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@
2525
class CallbackQuery(TelegramObject):
2626
"""This object represents a Telegram CallbackQuery."""
2727

28-
def __init__(self, id, from_user, data, chat_instance, bot=None, **kwargs):
28+
def __init__(self, id, from_user, chat_instance, bot=None, **kwargs):
2929
# Required
3030
self.id = id
3131
self.from_user = from_user
32-
self.data = data
3332
self.chat_instance = chat_instance
3433
# Optionals
3534
self.message = kwargs.get('message')
35+
self.data = kwargs.get('data', '')
3636
self.inline_message_id = kwargs.get('inline_message_id', '')
3737
self.game_short_name = kwargs.get('game_short_name')
3838

telegram/message.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ def __init__(self, message_id, from_user, date, chat, bot=None, **kwargs):
123123
self.text = kwargs.get('text', '')
124124
self.entities = kwargs.get('entities', list())
125125
self.audio = kwargs.get('audio')
126+
self.game = kwargs.get('game')
126127
self.document = kwargs.get('document')
127128
self.photo = kwargs.get('photo')
128129
self.sticker = kwargs.get('sticker')

0 commit comments

Comments
 (0)
X Tutup