diff options
author | Dmitrii Morozov <snoopdesigns@gmail.com> | 2024-04-12 01:12:35 +0200 |
---|---|---|
committer | Dmitrii Morozov <snoopdesigns@gmail.com> | 2024-04-12 01:12:35 +0200 |
commit | 9c8fcc8a636ed8c1fa6734e4f5ad6ca346830939 (patch) | |
tree | 071fa8ce7f927bf74f73903b55af69edff669da4 /Formatter.py | |
parent | 9b82c36d8831ef51163a5042f75743f54b0aa43a (diff) |
Fixed formatting of online friends
Diffstat (limited to 'Formatter.py')
-rw-r--r-- | Formatter.py | 8 |
1 files changed, 5 insertions, 3 deletions
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)), |