Archived
1
0
Fork 0
This commit is contained in:
yzhh 2022-05-22 23:05:06 +08:00
parent 07338a31a2
commit 4dc551a25f
3 changed files with 10 additions and 12 deletions

View file

@ -6,5 +6,12 @@ class ConfigFileNotFound(Exception):
pass
class InvalidHelpDocTypeError(Exception):
pass
class InvalidCommandFormatError(Exception):
pass
class FinishedException(BaseException):
pass

View file

@ -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):

View file

@ -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