Skip to content

[Feature] 消息表态适配ws-plugin协议端方法#122

Merged
RF-Tar-Railt merged 3 commits into
nonebot:masterfrom
molanp:master
Oct 15, 2025
Merged

[Feature] 消息表态适配ws-plugin协议端方法#122
RF-Tar-Railt merged 3 commits into
nonebot:masterfrom
molanp:master

Conversation

@molanp
Copy link
Copy Markdown
Contributor

@molanp molanp commented Oct 15, 2025

不知道这样写对不对


参考: https://github.com/XasYer/ws-plugin/blob/master/model%2Fapi.js#L365-L381

    // 设置表情表态
    set_reaction: async (params) => {
      /**
       * https://bot.q.qq.com/wiki/develop/api-v2/openapi/emoji/model.html#EmojiType
       * @param code 表情ID
       * @param type 表情类型 EmojiType
       */
      if (params.is_add) {
        await bot
          .pickGroup(params.group_id)
          .setReaction?.(params.message_id, params.code, params.type || 1);
      } else {
        await bot
          .pickGroup(params.group_id)
          .delReaction?.(params.message_id, params.code, params.type || 1);
      }
    },

@RF-Tar-Railt
Copy link
Copy Markdown
Member

RF-Tar-Railt commented Oct 15, 2025

有EmojiType的话,参考一下qq适配器里的写法

@RF-Tar-Railt RF-Tar-Railt changed the title 适配ws-plugin协议端方法 [Feature] 消息表态适配ws-plugin协议端方法 Oct 15, 2025
@RF-Tar-Railt RF-Tar-Railt merged commit 6319995 into nonebot:master Oct 15, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants