update
This commit is contained in:
parent
07338a31a2
commit
4dc551a25f
3 changed files with 10 additions and 12 deletions
|
@ -6,5 +6,12 @@ class ConfigFileNotFound(Exception):
|
|||
pass
|
||||
|
||||
|
||||
class InvalidHelpDocTypeError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class InvalidCommandFormatError(Exception):
|
||||
pass
|
||||
|
||||
class FinishedException(BaseException):
|
||||
pass
|
||||
|
|
|
@ -5,20 +5,11 @@ from typing import Union
|
|||
|
||||
from core.docopt import docopt, DocoptExit
|
||||
from core.elements import Command, Option, Schedule, StartUp, RegexCommand, command_prefix, MessageSession
|
||||
from core.exceptions import InvalidCommandFormatError, InvalidHelpDocTypeError
|
||||
|
||||
command_prefix_first = command_prefix[0]
|
||||
|
||||
|
||||
class InvalidHelpDocTypeError(BaseException):
|
||||
def __init__(self, *args, **kwargs):
|
||||
pass
|
||||
|
||||
|
||||
class InvalidCommandFormatError(BaseException):
|
||||
def __init__(self, *args, **kwargs):
|
||||
pass
|
||||
|
||||
|
||||
class CommandParser:
|
||||
def __init__(self, args: Union[str, list, tuple, Command, Option, Schedule, StartUp, RegexCommand], prefix=None,
|
||||
msg: MessageSession = None):
|
||||
|
|
|
@ -4,10 +4,10 @@ from aiocqhttp.exceptions import ActionFailed
|
|||
from datetime import datetime
|
||||
|
||||
from core.elements import MessageSession, Command, command_prefix, ExecutionLockList, RegexCommand, ErrorMessage
|
||||
from core.exceptions import AbuseWarning, FinishedException
|
||||
from core.exceptions import AbuseWarning, FinishedException, InvalidCommandFormatError, InvalidHelpDocTypeError
|
||||
from core.loader import ModulesManager
|
||||
from core.logger import Logger
|
||||
from core.parser.command import CommandParser, InvalidCommandFormatError, InvalidHelpDocTypeError
|
||||
from core.parser.command import CommandParser
|
||||
from core.tos import warn_target
|
||||
from core.utils import remove_ineffective_text, RemoveDuplicateSpace
|
||||
from database import BotDBUtil
|
||||
|
|
Reference in a new issue