0ph1uch1 / MiraiCP-template

MiraiCP template
https://github.com/Nambers/MiraiCP
GNU Affero General Public License v3.0
12 stars 5 forks source link

fix: MiraiCP.hpp #11

Closed shuli106 closed 1 year ago

shuli106 commented 1 year ago

在使用MessageChain::first()时,发现函数体没有被声明为constauto firstImage = e.message.first<Image>(); 会提示如下错误 error: passing 'const MiraiCP::MessageChain' as 'this' argument discards qualifiers [-fpermissive]

Nambers commented 1 year ago

pr welcome 但是针对 single_include/MiraiCP 的 pr 应该被 pr 到上游来源仓库,因为这两个文件都是那里面生成的 比如你这个更改应该在 MiraiCP 原仓库提出并针对 https://github.com/Nambers/MiraiCP/blob/dev/cpp/include/sdk/MessageChain.h#LL175C9-L181C10 进行更改