This repository was archived by the owner on Aug 16, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +33
-1
lines changed Expand file tree Collapse file tree 4 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -24,4 +24,6 @@ api_exe(MemberJoinEvent)
2424api_exe(BotEvents)
2525api_exe(MemberLeaveEvent)
2626api_exe(RecallEvent)
27- api_exe(MessageType)
27+ api_exe(MessageType)
28+ api_exe(FetchEventsViaHTTP)
29+ api_exe(CompareMessage)
Original file line number Diff line number Diff line change 1+ #include < iostream>
2+ // 使用静态库必须要在引入 mirai.h 前定义这个宏
3+ #define MIRAICPP_STATICLIB
4+ #include < mirai.h>
5+
6+ int main ()
7+ {
8+ using namespace std ;
9+ using namespace Cyan ;
10+ system (" chcp 65001" );
11+
12+ MessageChain mc1 = MessageChain ().Plain (" ##" ).At (123456_qq).Face (14 ).Plain (" Hello" );
13+ MessageChain mc2 = MessageChain ().Plain (" ##" ).At (1234569_qq).Face (14 ).Plain (" Hello" );
14+
15+ if (mc1 == mc2)
16+ cout << " mc1 == mc2" << endl;
17+ else
18+ cout << " mc1 != mc2" << endl;
19+
20+ if (mc1 != mc2)
21+ cout << " mc1 != mc2" << endl;
22+ else
23+ cout << " mc1 == mc2" << endl;
24+
25+ return 0 ;
26+ }
File renamed without changes.
Original file line number Diff line number Diff line change @@ -105,6 +105,10 @@ namespace Cyan
105105 }
106106 return true ;
107107 }
108+ bool operator !=(const MessageChain& mc) const
109+ {
110+ return !this ->operator ==(mc);
111+ }
108112 virtual ~MessageChain () = default ;
109113 MessageChain& At (const QQ_t qq)
110114 {
You can’t perform that action at this time.
0 commit comments