nonebot2/none/default_config.py
2018-10-14 20:32:00 +08:00

41 lines
1.1 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""
Default configurations.
Any derived configurations must import everything from this module
at the very beginning of their code, and then set their own value
to override the default one.
For example:
>>> from none.default_config import *
>>> PORT = 9090
>>> DEBUG = False
>>> SUPERUSERS.add(123456)
>>> NICKNAME = '小明'
"""
from datetime import timedelta
from typing import Container, Union, Iterable, Pattern, Optional
from .expression import Expression_T
API_ROOT: str = ''
SECRET: str = ''
ACCESS_TOKEN: str = ''
HOST: str = '127.0.0.1'
PORT: int = 8080
DEBUG: bool = True
SUPERUSERS: Container[int] = set()
NICKNAME: Union[str, Iterable[str]] = ''
COMMAND_START: Iterable[Union[str, Pattern]] = {'/', '!', '', ''}
COMMAND_SEP: Iterable[Union[str, Pattern]] = {'/', '.'}
SESSION_EXPIRE_TIMEOUT: Optional[timedelta] = timedelta(minutes=5)
SESSION_RUN_TIMEOUT: Optional[timedelta] = None
SESSION_RUNNING_EXPRESSION: Expression_T = '您有命令正在执行,请稍后再试'
SHORT_MESSAGE_MAX_LENGTH: int = 50
APSCHEDULER_CONFIG = {
'apscheduler.timezone': 'Asia/Shanghai'
}