We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff7559c commit 4c666bbCopy full SHA for 4c666bb
bot.py
@@ -38,7 +38,7 @@
38
39
class Modmail(commands.Bot):
40
def __init__(self):
41
- super().__init__(command_prefix='m.')
+ super().__init__(command_prefix=self.get_pre)
42
self.uptime = datetime.datetime.utcnow()
43
self._add_commands()
44
@@ -63,6 +63,13 @@ def token(self):
63
except FileNotFoundError:
64
token = None
65
return os.environ.get('TOKEN') or token
66
+
67
+ @staticmethod
68
+ async def get_pre(bot, message):
69
+ '''Returns the prefix.'''
70
+ with open('data/config.json') as f:
71
+ prefix = json.load(f).get('PREFIX')
72
+ return os.environ.get('PREFIX') or prefix or 'r.'
73
74
@staticmethod
75
def run_wizard():
0 commit comments