Skip to content

Commit

Permalink
pyrofork: Add privacy_policy_url field to class BotInfo
Browse files Browse the repository at this point in the history
Signed-off-by: wulan17 <wulan17@nusantararom.org>
  • Loading branch information
wulan17 committed Aug 18, 2024
1 parent 2fae3c8 commit 95727c2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pyrogram/types/bots_and_keyboards/bot_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,25 @@ class BotInfo(Object):
description (``str``):
Description of the bot;
privacy_policy_url (``str``, *optional*):
Privacy policy URL of the bot.
"""

def __init__(self, name: str, about: str, description: str):
def __init__(self, name: str, about: str, description: str, privacy_policy_url: str = None):
super().__init__()

self.name = name
self.about = about
self.description = description
self.privacy_policy_url = privacy_policy_url


@staticmethod
def _parse(bot_info: "raw.types.bots.BotInfo") -> "BotInfo":
return BotInfo(
name=getattr(bot_info,"name", None),
about=getattr(bot_info,"about", None),
description=getattr(bot_info,"description", None)
description=getattr(bot_info,"description", None),
privacy_policy_url=getattr(bot_info,"privacy_policy_url", None)
)

0 comments on commit 95727c2

Please sign in to comment.