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