Open Harry-zklcdc opened 5 months ago
查看 tg 适配器源码,发现其读取的是 session 的guildId
将报告代码修改为
const messageIds = await ctx.broadcast([target.platform+':'+target.channelId], payload)
即可正常工作
已发布 4.0.1,请在更新后重新填写频道 ID
依旧还是无法正常运行,能需要修改报告的那一行代码才可以运行
依旧还是无法正常运行,能需要修改报告的那一行代码才可以运行
截图配置
constants:
TgFeed:
type: full
platform: telegram
selfId: '67****'
channelId: '5'
name: TG Feed
TgAsk:
type: full
platform: telegram
selfId: '67****'
channelId: '4'
name: TG 求助提问
TgChat:
type: full
platform: telegram
selfId: '67****'
channelId: '-10****'
name: TG 闲聊灌水
TgFeature:
type: full
platform: telegram
selfId: '67****'
channelId: '206'
name: TG 功能需求
QQFeed:
type: full
platform: qqguild
selfId: '82****'
channelId: '63****'
name: QQ Feed
QQAsk:
type: full
platform: qqguild
selfId: '82****'
channelId: '63****'
name: QQ频道 求助提问
QQChat:
type: full
platform: qqguild
selfId: '82****'
channelId: '63****'
name: QQ频道 闲聊灌水
QQFeature:
type: full
platform: qqguild
selfId: '82****'
channelId: '63****'
name: QQ频道 功能需求
rules:
- targets:
- QQFeed
source: TgFeed
- targets:
- TgFeed
source: QQFeed
- targets:
- TgAsk
source: QQAsk
- targets:
- QQAsk
source: TgAsk
- targets:
- TgChat
source: QQChat
- targets:
- QQChat
source: TgChat
- targets:
- TgFeature
source: QQFeature
- targets:
- QQFeature
source: TgFeature
channelId 不对,请使用 inspect 插件获取
使用 ctx.broadcast
方法吧,bot.sendMessage
在 tg 适配器的实现中,并不是直接读取 guildId 的
![]()
使用
ctx.broadcast
方法吧,bot.sendMessage
在 tg 适配器的实现中,并不是直接读取 guildId 的
4.0.1 没有读取 guildId
版本信息
Koishi 4.16.8 @myrtus/koishi-plugin-forward 3.9.1
配置文件
日志文件
猜测可能下面这行代码导致
https://github.com/bot-myrtus/forward/blob/39823e0e186b03fd8822b0fc7097294ee7d4e868/src/core.ts#L183
Koishi 的 bot.sendMessage 方法不支持 guildId 了,文档:https://koishi.chat/zh-CN/api/resources/message.html#bot-getmessage
可能需要特殊判断,使用 telegram 适配器内部方法 internal.sendMessage() 代替