Archived
1
0
Fork 0
This commit is contained in:
yzhh 2022-08-13 15:13:30 +08:00
parent 12e43a5325
commit 836ef79a99
6 changed files with 5 additions and 5 deletions

View file

@ -60,7 +60,6 @@ async def _(event: Event):
Session(message=event,
target=event.group_id if event.detail_type == 'group' else event.user_id,
sender=event.user_id))
MessageTaskManager.check(msg)
await parser(msg, running_mention=True, prefix=prefix)

View file

@ -28,7 +28,6 @@ async def msg_handler(message: types.Message):
messageId=message.message_id,
replyId=replyId),
Session(message=message, target=message.chat.id, sender=message.from_user.id))
MessageTaskManager.check(msg)
await parser(msg)

View file

@ -35,8 +35,8 @@ async def console_scheduler():
async def console_command():
try:
m = await aioconsole.ainput('> ')
asyncio.create_task(console_command())
await send_command(m)
await console_command()
except KeyboardInterrupt:
print('Exited.')
exit()

View file

@ -45,6 +45,7 @@ class Template(MS):
if msgchain is not None:
send = await self.sendMessage(msgchain)
print("(发送“是”或符合确认条件的词语来确认)")
print(self.session.auto_interactions)
if self.session.auto_interactions:
c = self.session.auto_interactions[0]
del self.session.auto_interactions[0]

View file

@ -17,7 +17,7 @@ from core.logger import Logger
from core.parser.args import Template, ArgumentPattern, templates_to_str
from core.parser.command import CommandParser
from core.tos import warn_target
from core.utils import removeIneffectiveText, removeDuplicateSpace
from core.utils import removeIneffectiveText, removeDuplicateSpace, MessageTaskManager
from database import BotDBUtil
enable_tos = Config('enable_tos')
@ -86,6 +86,7 @@ async def parser(msg: MessageSession, require_enable_modules: bool = True, prefi
identify_str = f'[{msg.target.senderId}{f" ({msg.target.targetId})" if msg.target.targetFrom != msg.target.senderFrom else ""}]'
# Logger.info(f'{identify_str} -> [Bot]: {display}')
try:
MessageTaskManager.check(msg)
modules = ModulesManager.return_modules_list_as_dict(msg.target.targetFrom)
modulesAliases = ModulesManager.return_modules_alias_map()
modulesRegex = ModulesManager.return_specified_type_modules(RegexCommand, targetFrom=msg.target.targetFrom)

View file

@ -149,7 +149,7 @@ async def get_rating(uid, query_type):
output = ImageOps.fit(im, mask.size, centering=(0.5, 0.5))
output.putalpha(mask)
output.convert('RGBA')
b30img.alpha_composite(output, (1825, 25))
b30img.alpha_composite(output, (1825, 24))
except:
traceback.print_exc()