From 39539cff2be48cab48f18f02485659561bc33517 Mon Sep 17 00:00:00 2001 From: Elmon11 Date: Sat, 19 Dec 2020 16:53:59 +0100 Subject: [PATCH] Update functions.py --- functions.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/functions.py b/functions.py index 3858392..b1628c4 100644 --- a/functions.py +++ b/functions.py @@ -44,6 +44,12 @@ def removed_role_mentions(old, new): roles.append(role) 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): if user.avatar_url: