mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-12-01 01:25:07 +08:00
Import everything from aiocqhttp.message in none.message
This commit is contained in:
parent
bc0d7aaa64
commit
67362e97e7
@ -143,10 +143,8 @@ def load_builtin_plugins() -> None:
|
||||
load_plugins(plugin_dir, 'none.plugins')
|
||||
|
||||
|
||||
from .message import message_preprocessor
|
||||
from .message import message_preprocessor, Message, MessageSegment
|
||||
from .command import on_command, CommandSession, CommandGroup
|
||||
from .natural_language import on_natural_language, NLPSession, NLPResult
|
||||
from .notice_request import (
|
||||
on_notice, NoticeSession,
|
||||
on_request, RequestSession,
|
||||
)
|
||||
from .notice_request import (on_notice, NoticeSession,
|
||||
on_request, RequestSession)
|
||||
|
@ -1,7 +1,7 @@
|
||||
import random
|
||||
from typing import Union, Sequence, Callable
|
||||
|
||||
from aiocqhttp import message
|
||||
from .message import escape
|
||||
|
||||
Expression_T = Union[str, Sequence[str], Callable]
|
||||
|
||||
@ -23,5 +23,5 @@ def render(expr: Expression_T, *, escape_args=True,
|
||||
if escape_args:
|
||||
for k, v in kwargs.items():
|
||||
if isinstance(v, str):
|
||||
kwargs[k] = message.escape(v)
|
||||
kwargs[k] = escape(v)
|
||||
return expr.format(**kwargs)
|
||||
|
@ -3,11 +3,10 @@ import re
|
||||
from collections import namedtuple
|
||||
from typing import Dict, Any, Iterable, Optional, Callable, Union
|
||||
|
||||
from aiocqhttp.message import Message
|
||||
|
||||
from . import NoneBot, permission as perm
|
||||
from .command import call_command
|
||||
from .log import logger
|
||||
from .message import Message
|
||||
from .session import BaseSession
|
||||
|
||||
_nl_processors = set()
|
||||
|
@ -1,6 +1,5 @@
|
||||
from aiocqhttp.message import unescape
|
||||
|
||||
from none import on_command, CommandSession, permission as perm
|
||||
from none.message import unescape
|
||||
|
||||
|
||||
@on_command('echo')
|
||||
|
Loading…
Reference in New Issue
Block a user