From 9c8fcc8a636ed8c1fa6734e4f5ad6ca346830939 Mon Sep 17 00:00:00 2001 From: Dmitrii Morozov Date: Fri, 12 Apr 2024 01:12:35 +0200 Subject: Fixed formatting of online friends --- Formatter.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Formatter.py') diff --git a/Formatter.py b/Formatter.py index 5cd065d..e43b782 100644 --- a/Formatter.py +++ b/Formatter.py @@ -58,10 +58,12 @@ def __formatExternalAuth(external_auth: fortnitepy.ExternalAuth): return '{} \({}\)'.format(external_auth.external_display_name, external_auth.type) def formatFriendOnline(display_name: str, party_size: int): - if party_size > 1: - text = 'is playing Fortnite with {} friends\!'.format(str(party_size - 1)) - else: + if party_size == 1: text = 'is playing Fortnite\!' + elif party_size == 2: + text = 'is playing Fortnite with {} friend\!'.format(str(party_size - 1)) + elif party_size > 2: + text = 'is playing Fortnite with {} friends\!'.format(str(party_size - 1)) return formatting.format_text( u'\u2b50', formatting.mbold('{}'.format(display_name)), -- cgit v1.2.3