Archived
1
0
Fork 0
This commit is contained in:
yzhh 2021-05-18 23:10:36 +08:00
parent 27ee6c9e08
commit bbf4df07ec
2 changed files with 4 additions and 2 deletions

View file

@ -6,8 +6,7 @@ from graia.application import Friend
from graia.application.group import Group, Member from graia.application.group import Group, Member
from graia.application.message.chain import MessageChain from graia.application.message.chain import MessageChain
from core.elements import Target from core.loader import Modules, logger_info
from core.loader import Modules
from core.template import sendMessage, Nudge from core.template import sendMessage, Nudge
from core.utils import getsetu from core.utils import getsetu
from database import BotDB as database from database import BotDB as database
@ -44,6 +43,7 @@ async def parser(kwargs: dict):
try: try:
with eventlet.Timeout(90, False): with eventlet.Timeout(90, False):
if display[0] in command_prefix: # 检查消息前缀 if display[0] in command_prefix: # 检查消息前缀
logger_info(kwargs)
command = re.sub(r'^' + display[0], '', display) command = re.sub(r'^' + display[0], '', display)
command_first_word = command.split(' ')[0] # 切割消息 command_first_word = command.split(' ')[0] # 切割消息
if command_first_word in Modules['command']: # 检查触发命令是否在模块列表中 if command_first_word in Modules['command']: # 检查触发命令是否在模块列表中

View file

@ -154,7 +154,9 @@ async def download_to_cache(link):
async def slk_converter(filepath): async def slk_converter(filepath):
filepath2 = filepath + '.silk' filepath2 = filepath + '.silk'
logger_info('Start encoding voice...')
os.system('python slk_coder.py ' + filepath) os.system('python slk_coder.py ' + filepath)
logger_info('Voice encoded.')
return filepath2 return filepath2