Update functions.py

This commit is contained in:
Elmon11 2020-12-19 16:53:59 +01:00 committed by GitHub
parent 79f0577afe
commit 39539cff2b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -44,6 +44,12 @@ def removed_role_mentions(old, new):
roles.append(role) roles.append(role)
return roles return roles
def get_prefix(bot, message):
#prefixes = ['TF!', 'Tf!', 'tF!', 'tf!']
prefix = os.getenv('prefix')
prefixes = map(''.join, itertools.product(*((letter.upper(), letter.lower()) for letter in prefix)))
return commands.when_mentioned_or(*prefixes)(bot, message)
def get_avatar(user, animate=True): def get_avatar(user, animate=True):
if user.avatar_url: if user.avatar_url: