Skip to content

Commit

Permalink
added docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
missytake committed Aug 20, 2024
1 parent 32faf3d commit 9c40e5f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/team_bot/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,11 @@ def get_relay_group(self, outside_id: int) -> deltachat.Chat:
return self.account.get_chat_by_id(mapping[1])
return None

def offboard(self, ex_admin):
def offboard(self, ex_admin: deltachat.Contact) -> None:
"""Remove a former crew member from all relay groups they are part of.
:param ex_admin: a contact which just got removed from the crew.
"""
for mapping in self.kvstore.get("relays"):
relay_group = self.account.get_chat_by_id(mapping[1])
if ex_admin in relay_group.get_contacts():
Expand Down

0 comments on commit 9c40e5f

Please sign in to comment.