v1.0 stable features

This commit is contained in:
klemek
2019-11-13 14:19:22 +01:00
parent a2202c026b
commit 0fb04604dc
4 changed files with 156 additions and 97 deletions
+21
View File
@@ -0,0 +1,21 @@
# DISCORD API
def debug(message, txt):
print(f"{message.guild} > #{message.channel}: {txt}")
# LISTS
def no_duplicate(seq):
return list(dict.fromkeys(seq))
# MESSAGE FORMATTING
def aggregate(names):
if len(names) == 0:
return ""
elif len(names) == 1:
return names[0]
else:
return ", ".join(names[:-1]) + " & " + names[-1]