Fix error with subscripting sets
This commit is contained in:
parent
9082559dd4
commit
6f0ead5850
@ -9,6 +9,8 @@ MUMBLE_URL = os.getenv('MUMBLE_BOT_MUMBLE_URL')
|
||||
def fmt_list(users: Set[str], bold=True):
|
||||
if bold:
|
||||
users = [f'*{user}*' for user in users]
|
||||
else:
|
||||
users = list(users)
|
||||
if len(users) == 1:
|
||||
return users[0]
|
||||
return ', '.join(users[:-1]) + f' and {users[-1]}'
|
||||
|
Loading…
Reference in New Issue
Block a user