Merge pull request #433 from PH89/october3

small fix for game related parts
This commit is contained in:
Jacob Bom 2016-10-07 22:25:52 +02:00 committed by GitHub
commit 67b98e3190
4 changed files with 5 additions and 3 deletions

View file

@ -27,6 +27,7 @@ The following wonderful people contributed directly or indirectly to this projec
- `Noam Meltzer <https://github.com/tsnoam>`_
- `Oleg Shlyazhko <https://github.com/ollmer>`_
- `overquota <https://github.com/overquota>`_
- `Patrick Hofmann <https://github.com/PH89>`_
- `Rahiel Kasim <https://github.com/rahiel>`_
- `Shelomentsev D <https://github.com/shelomentsevd>`_
- `sooyhwang <https://github.com/sooyhwang>`_

View file

@ -776,7 +776,7 @@ class Bot(TelegramObject):
:class:`telegram.TelegramError`
"""
url = '{0}/sendMessage'.format(self.base_url)
url = '{0}/sendGame'.format(self.base_url)
data = {'chat_id': chat_id, 'game_short_name': game_short_name}

View file

@ -25,14 +25,14 @@ from telegram import TelegramObject, Message, User
class CallbackQuery(TelegramObject):
"""This object represents a Telegram CallbackQuery."""
def __init__(self, id, from_user, data, chat_instance, bot=None, **kwargs):
def __init__(self, id, from_user, chat_instance, bot=None, **kwargs):
# Required
self.id = id
self.from_user = from_user
self.data = data
self.chat_instance = chat_instance
# Optionals
self.message = kwargs.get('message')
self.data = kwargs.get('data', '')
self.inline_message_id = kwargs.get('inline_message_id', '')
self.game_short_name = kwargs.get('game_short_name')

View file

@ -123,6 +123,7 @@ class Message(TelegramObject):
self.text = kwargs.get('text', '')
self.entities = kwargs.get('entities', list())
self.audio = kwargs.get('audio')
self.game = kwargs.get('game')
self.document = kwargs.get('document')
self.photo = kwargs.get('photo')
self.sticker = kwargs.get('sticker')