mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-12-23 06:50:29 +01:00
Type as optional for GroupChat
This commit is contained in:
parent
f2b0cb46a2
commit
3fa8b97ed2
1 changed files with 7 additions and 3 deletions
|
@ -33,17 +33,21 @@ class GroupChat(TelegramObject):
|
||||||
Args:
|
Args:
|
||||||
id (int):
|
id (int):
|
||||||
title (str):
|
title (str):
|
||||||
type (str):
|
**kwargs: Arbitrary keyword arguments.
|
||||||
|
|
||||||
|
Keyword Args:
|
||||||
|
type (Optional[str]):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
id,
|
id,
|
||||||
title,
|
title,
|
||||||
type):
|
**kwargs):
|
||||||
# Required
|
# Required
|
||||||
self.id = int(id)
|
self.id = int(id)
|
||||||
self.title = title
|
self.title = title
|
||||||
self.type = type
|
# Optionals
|
||||||
|
self.type = kwargs.get('type', '')
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def de_json(data):
|
def de_json(data):
|
||||||
|
|
Loading…
Reference in a new issue