koishijs / koishi

Cross-platform chatbot framework made with love
https://koishi.chat
MIT License
4.37k stars 239 forks source link

Bug: telegram slash command 无法使用 #1174

Closed Ice-Hazymoon closed 1 year ago

Ice-Hazymoon commented 1 year ago

Describe the bug

原本的 tg 适配器没有对 slash command 做兼容,更新了koishi 及其依赖和适配器后,所有带下划线的指令都无法处理

TypeError: Cannot destructure property 'name' of 'session.data.argv' as it is undefined.
                            at _Session.<anonymous> (E:\Project\bot\node_modules\@koishijs\core\src\middleware.ts:87:15)     
                            at _Lifecycle.emit (E:\Project\bot\node_modules\cordis\src\events.ts:98:16)
                            at _Context.emit (E:\Project\bot\node_modules\cordis\src\context.ts:81:30)
                            at _TelegramBot.dispatch (E:\Project\bot\node_modules\@satorijs\core\src\bot.ts:119:20)
                            at handleUpdate (E:\Project\bot\node_modules\@satorijs\adapter-telegram\src\utils.ts:89:7)       
                            at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Steps to reproduce

如题

Expected behavior

如题

Screenshots

No response

Versions

koishi: 4.14.1 adapter-telegram: 3.8.0

Additional context

No response

shigma commented 1 year ago

等明天更新就行了。急用的话锁一下 tg 插件版本。

shigma commented 1 year ago

4.14.2 版本已经支持。