mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-11 21:30:59 +00:00
fix: 修复返回值获取时的bug
This commit is contained in:
@@ -39,7 +39,7 @@ def process_normal_message(text_message: str, mgr, config, launcher_type: str,
|
|||||||
prefix = event.get_return_value("prefix")
|
prefix = event.get_return_value("prefix")
|
||||||
|
|
||||||
if event.get_return_value("reply") is not None:
|
if event.get_return_value("reply") is not None:
|
||||||
reply = event.get_return("reply")
|
reply = event.get_return_value("reply")
|
||||||
|
|
||||||
if not event.is_prevented_default():
|
if not event.is_prevented_default():
|
||||||
reply = [prefix + text]
|
reply = [prefix + text]
|
||||||
|
|||||||
@@ -65,7 +65,6 @@ def process_message(launcher_type: str, launcher_id: int, text_message: str, mes
|
|||||||
|
|
||||||
processing.append(session_name)
|
processing.append(session_name)
|
||||||
try:
|
try:
|
||||||
|
|
||||||
if text_message.startswith('!') or text_message.startswith("!"): # 指令
|
if text_message.startswith('!') or text_message.startswith("!"): # 指令
|
||||||
# 触发插件事件
|
# 触发插件事件
|
||||||
args = {
|
args = {
|
||||||
@@ -86,7 +85,7 @@ def process_message(launcher_type: str, launcher_id: int, text_message: str, mes
|
|||||||
|
|
||||||
# 取出插件提交的返回值赋值给reply
|
# 取出插件提交的返回值赋值给reply
|
||||||
if event.get_return_value("reply") is not None:
|
if event.get_return_value("reply") is not None:
|
||||||
reply.append(event.get_return("reply"))
|
reply = event.get_return_value("reply")
|
||||||
|
|
||||||
if not event.is_prevented_default():
|
if not event.is_prevented_default():
|
||||||
reply = pkg.qqbot.command.process_command(session_name, text_message,
|
reply = pkg.qqbot.command.process_command(session_name, text_message,
|
||||||
|
|||||||
Reference in New Issue
Block a user