Teahouse-Studios / akari-bot

茶馆群内QQ机器人(小可)
https://bot.teahouse.team
GNU Affero General Public License v3.0
185 stars 36 forks source link

[Help]代码报错 #547

Closed SilianZ closed 1 year ago

SilianZ commented 1 year ago

我按照官网上的指引写了个发送消息的函数: image

[ERROR]:Traceback (most recent call last):
  File "C:\Users\silia\OneDrive\minecraft\akari-bot-4.0.10-release.1\akari-bot-4.0.10-release.1\core\parser\message.py", line 275, in parser
    await execute_submodule(msg, command_first_word, command_split)
  File "C:\Users\silia\OneDrive\minecraft\akari-bot-4.0.10-release.1\akari-bot-4.0.10-release.1\core\parser\message.py", line 252, in execute_submodule
    await parsed_msg[0].function(msg)  # 将msg传入下游模块
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\silia\OneDrive\minecraft\akari-bot-4.0.10-release.1\akari-bot-4.0.10-release.1\modules\cave\__init__.py", line 10, in print_out
    send = await msg.sendMessage[Plain('咳咳咳……\n[该消息将在一分钟后撤回]'), Image("./modules/cave/IMG_2570.JPG")]
                                 ^^^^^
NameError: name 'Plain' is not defined

这是报错信息。

Dianliang233 commented 1 year ago

缺少import罢了

SilianZ commented 1 year ago

所以导哪个库啊啊啊

从 Windows 版邮件https://go.microsoft.com/fwlink/?LinkId=550986发送


发件人: Dianliang233 @.> 发送时间: Sunday, April 16, 2023 9:32:28 AM 收件人: Teahouse-Studios/akari-bot @.> 抄送: SilianZ @.>; Author @.> 主题: Re: [Teahouse-Studios/akari-bot] [Help]代码报错 (Issue #547)

缺少import罢了

― Reply to this email directly, view it on GitHubhttps://github.com/Teahouse-Studios/akari-bot/issues/547#issuecomment-1510016894, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A3DPGFZLEASWVOO3BSATZ2TXBND2XANCNFSM6AAAAAAW7Y242U. You are receiving this because you authored the thread.Message ID: @.***>

Dianliang233 commented 1 year ago

所以导哪个库啊啊啊 从 Windows 版邮件<https://go.microsoft.com/fwlink/?LinkId=550986>发送 ____ 发件人: Dianliang233 @.> 发送时间: Sunday, April 16, 2023 9:32:28 AM 收件人: Teahouse-Studios/akari-bot @.> 抄送: SilianZ @.>; Author @.> 主题: Re: [Teahouse-Studios/akari-bot] [Help]代码报错 (Issue #547) 缺少import罢了 ― Reply to this email directly, view it on GitHub<#547 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A3DPGFZLEASWVOO3BSATZ2TXBND2XANCNFSM6AAAAAAW7Y242U. You are receiving this because you authored the thread.Message ID: @.***>

from core.builtins import Plain