test
This commit is contained in:
parent
1772db3ef1
commit
7ece77b2af
@ -21,8 +21,7 @@ class Commands():
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def multi_split_key(self):
|
def multi_split_key(self):
|
||||||
# TODO config
|
return self.config.SpiceBot.multi_split_key
|
||||||
return "&&"
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def pipe_split_key(self):
|
def pipe_split_key(self):
|
||||||
|
|||||||
@ -6,6 +6,8 @@ import os
|
|||||||
|
|
||||||
from sopel.cli.run import build_parser, get_configuration
|
from sopel.cli.run import build_parser, get_configuration
|
||||||
|
|
||||||
|
from sopel.config.types import StaticSection, ValidatedAttribute
|
||||||
|
|
||||||
|
|
||||||
class Config():
|
class Config():
|
||||||
|
|
||||||
@ -43,3 +45,8 @@ class Config():
|
|||||||
|
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
class SpiceBot_Conf(StaticSection):
|
||||||
|
|
||||||
|
multi_split_key = ValidatedAttribute('multi_split_key', default="&&")
|
||||||
|
|||||||
@ -8,11 +8,17 @@ import os
|
|||||||
import pathlib
|
import pathlib
|
||||||
|
|
||||||
from .SBCore import SpiceBotCore_OBJ
|
from .SBCore import SpiceBotCore_OBJ
|
||||||
|
from .osd import SpiceBot_Conf
|
||||||
|
|
||||||
SCRIPT_DIR = pathlib.Path(os.path.dirname(os.path.abspath(__file__)))
|
SCRIPT_DIR = pathlib.Path(os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
|
||||||
sb = SpiceBotCore_OBJ(SCRIPT_DIR)
|
sb = SpiceBotCore_OBJ(SCRIPT_DIR)
|
||||||
|
|
||||||
|
|
||||||
|
def configure(config):
|
||||||
|
config.define_section("SpiceBot", SpiceBot_Conf, validate=False)
|
||||||
|
config.SpiceBot_Conf.configure_setting('multi_split_key', 'key to split multi-commands')
|
||||||
|
|
||||||
|
|
||||||
def setup(bot):
|
def setup(bot):
|
||||||
sb.setup(bot)
|
sb.setup(bot)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user