Update functions.py

This commit is contained in:
Elmon11 2020-12-18 18:20:05 +01:00 committed by GitHub
parent 73b08a360d
commit 19519023e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,15 +12,15 @@ class embed_entry:
self.playercount = playercount self.playercount = playercount
def format_list_entry(embed, l, name): def format_list_entry(embed, l, name):
l_names = [] l_names = [f'{l[i]}' for i in range(len(l))]
[l_names.append(f'`{l[i]}`') for i in range(len(l))] l_names = [name.replace('_', '\_') for name in l_names]
em = embed_entry(name=name, em = embed_entry(name=name,
value=", ".join(l_names), value=", ".join(l_names),
playercount = len(l) playercount = len(l)
) )
return em return em
def did_mention_other_user(users, author): def did_mention_other_user(users, author):
for user in users: for user in users:
if user is not author: if user is not author: