Beispiel #1
0
def add_ignore_member(database: Database, member_id: int, peer_id: int) -> None:
    database.ignored_members.append(
        IgnoredMembers(
            member_id=member_id,
            chat_id=peer_id
        )
    )
    database.save()
Beispiel #2
0
 def ignored_members(data: dict) -> List[IgnoredMembers]:
     try:
         return [
             IgnoredMembers(ign_member)
             for ign_member in data['ignored_members']
         ]
     except KeyError:
         return []