Added prefix as init argument
parent
92d19c0ccd
commit
cccdd667fb
|
@ -23,20 +23,21 @@ class Frank(discord.Client):
|
|||
their own behavior.
|
||||
"""
|
||||
|
||||
PREFIX = 'fr'
|
||||
"""Prefix to use Frank inside Discord."""
|
||||
|
||||
def __init__(self, modules: List[Module], config_file: str = 'frank.yaml'):
|
||||
def __init__(self, modules: List[Module], config_file: str = 'frank.yaml',
|
||||
prefix: str = 'fr'):
|
||||
"""
|
||||
Args:
|
||||
modules: modules to load
|
||||
config_file: path to yaml config file; ignored if non-existent
|
||||
prefix: prefix to activate Frank in the Discord server
|
||||
"""
|
||||
|
||||
super().__init__()
|
||||
self._modules = modules
|
||||
self._loaded_modules = []
|
||||
|
||||
self.PREFIX = prefix
|
||||
|
||||
try:
|
||||
with open(config_file, 'r') as f:
|
||||
self._config = yaml.load(f, Loader=yaml.FullLoader)
|
||||
|
|
Reference in New Issue