oicqã¯ãNode.js ãããŒã¹ã«ãã QQïŒAndroidïŒãããã³ã«ã®å®è£
ã§ãããQQ å
ã§ãã䜿çšãããæ©èœæäœãæäŸããŠããŸãã
yuan-botã¯ãoicqãããŒã¹ã«ããTS ã§æžãããMongoDB ãããŒã¿ããŒã¹ãšããŠäœ¿çšãã QQ ãããã§ããçŸåšããããžã§ã¯ãã¯æ°ããäœæãããQ ã°ã«ãŒãã®ãšãã»ã³ã·ã£ã«ã¡ãã»ãŒãžã«ã®ã¿å¯Ÿå¿ããŠãããå°æ¥çã«ã¯ã³ã³ãã³ããå
å®ããŠããäºå®ã§ãã
GitHub ã¢ãã¬ã¹ïŒyuan-bot
ãã®èšäºã¯ããã®ãããžã§ã¯ãã®éå ¬åŒã®éçºæ¥èªã®çµéèšé²ã§ãã
èæ¯#
ç§ã® QQ ã«ã¯ãé«æ ¡ã倧åŠã®æã«å£äžããã¬ã€ããŠããã²ãŒã ã°ã«ãŒãããããŸãã
ã¡ã³ããŒå
šå¡ãäžæã«ãã¬ã€ãã話ãããšãäžæã§ããããããã®èšèãèšæ¶ããããã«ãç§ãã¡ã¯ QQ ã®ãšãã»ã³ã·ã£ã«ã¡ãã»ãŒãžæ©èœã掻çšãããã¹ãŠã® ãããã¹ã ã¯ã©ã·ãã¯ãªåèšããšãã»ã³ã·ã£ã«ã¡ãã»ãŒãžãªã¹ãã«é£ŸããŸããã
ãã®æç¹ã§ããšãã»ã³ã·ã£ã«ã¡ãã»ãŒãžã®å
容ã¯ãã¯ããšãã»ã³ã·ã£ã«ã§ã¯ãªããç§ãã¡ã¯é»ã£ãŠããããç³ç²ããšåŒãã§ããŸã
ç§ãã¡ããªã¹ãã«é£Ÿã£ãã¡ã³ããŒã¯ãèŠæ ãèšã£ãŠããŸãïŒãã¡ãããããã楜ããã§ãã人ãããŸãããç§ã¯èšããŸãããçãããããã£ãŠããã¯ãã§ãïŒã圌ãã¯ç®¡çè ã«èšŽããŠããã®äžã«ã¯ç®¡çè ã®é°è¬ããããšäž»åŒµããŠããŸãïŒçŸ€åã¯èšŽãã«å¿ããŠåœŒãèšã€ã¹ãã§ãïŒ
ããããéã¯é«ããéã¯é«ãã§ããåå£ãªã°ã«ãŒã管çè ã¯ã矀åã®èŠæ ãç¡èŠããããã«ã¯å æ¥ãã°ã«ãŒãã 8 åšå¹Žãè¿ããæ¥ã«ç³ç²ã®åšèŸºååãçºå£²ããŸããïŒå¹žéãªããšã«ãç§ã 1 ã€æã«å ¥ããŸããïŒãåæã«ãç³ç²ã®æ°ãæãå€ãã¡ã³ããŒã«ãããã£ãŒãæäžããç³ç²æåãç©æ¥µçã«æšé²ããŸãããå ããŠã矀åã®å¿ã¯ä¹±ããã°ã«ãŒãå ã®å察ã®å£°ã¯æ¬¡ç¬¬ã«æ¶ããŠããã誰ããç¬ãã®çš®ã«ãªããŸããã
ãããŸã§ãç³ç²æåã¯ã°ã«ãŒãã®èšç«ä»¥æ¥ã®ãã€ã©ã€ãã«éããŸããã
ç³ç²æåãåºãŸãã«ã€ããç³ç²ã®æ°ãå¢ãç¶ããã°ã«ãŒã管çè ã¯ããã€ãã®åé¡ã«æ°ä»ããŸããã
- ç³ç²ã®æ°ã 1000 ã«éãããšãäžéšã®ç³ç²ã¡ãã»ãŒãžãåé€ããªããšè¿œå ã§ããªããªããäžéšã®ã°ã«ãŒãã®æŽå²çãªç³ç²ã倱ãããŸãã
- ãã®ãããªèšå€§ãªæ°ã®äžã§ãQQ ã°ã«ãŒãã®ãšãã»ã³ã·ã£ã«ã¡ãã»ãŒãžã¯çµ±èšãæéã§ã®è¡šç€ºãªã©ã®æ©èœããªããæ¯åæåã§çµ±èšããå¿ èŠããããŸãã
- ...
Yuan-Bot ã¯ãäžèšã®åé¡ã解決ããããã«çãŸããŸããã
èµ·å#
git clone https://github.com/Magren0321/yuan-bot.git
pnpm install
pnpm run serve
ããã»ã¹#
ç§ã¯ããã³ããšã³ããšã³ãžãã¢ãªã®ã§ãæè¡ã®éžæã¯èªç¶ãš Node.js ã«ãªããŸãããoicqãšããã©ã€ãã©ãªãèŠã€ããŸããããã㯠Node.js ãããŒã¹ã«ãã Android QQ ã§ãããç§ã«ãšã£ãŠã¯æ©èœãæ¯èŒçå å®ããŠããã©ã€ãã©ãªã§ããå ·äœçãªäœ¿çšæ¹æ³ã¯ç§ã®èª¬æãããApi referenceãåç §ããŠãã ããã
ãšãã»ã³ã·ã£ã«ããŒã¿#
oicq èªäœãã°ã«ãŒããªããžã§ã¯ãã«ãšãã»ã³ã·ã£ã«ããŒã¿ãã«ãã»ã«åããŠããªãããïŒãããããŸã ãã®æ©èœãåãããªãŒãã³ãœãŒã¹ã®ã©ã€ãã©ãªã¯ãªãã®ãããããŸããïŒãèªåã§æãåããå¿
èŠããããŸããã
Fiddler ã䜿çšã㊠PC ç QQ ã®ãã±ããããã£ããã£ãããšãã»ã³ã·ã£ã«ããŒã¿ã® API ããã£ããã£ããŸããããããŠãoicq ãæäŸãããã°ã€ã³ API ã䜿çšã㊠Cookie ãååŸãããªã¯ãšã¹ãããããŒã«è¿œå ããŠãšãã»ã³ã·ã£ã«ã¡ãã»ãŒãžã®ããŒã¿ãååŸããŸããã
ã€ãã§ã« oicq ã« PR ãæåºããŸããïŒãŸã PR ãæ°Žå¢ãããŸããïŒ
ãã®åŸãå¥ã®åé¡ã«ã¶ã€ãããŸãããã°ã«ãŒãã«æ°ãããšãã»ã³ã·ã£ã«ã¡ãã»ãŒãžãè¿œå ãããå Žåãoicq ã§ã°ã«ãŒãã® tips ããªãã¹ã³ã§ããªãããšã«æ°ä»ããŸãããæšå¹Ž 8 æã«ãã§ã«èª°ããåé¡ãæèµ·ããŠããŸããããŸã 解決ãããŠããªãããã§ãã
å
ã
ã®èšç»ã¯ããšãã»ã³ã·ã£ã«ã¡ãã»ãŒãžãè¿œå ãããåŸããµãŒããŒã®ããŒã¿ããŒã¹ã«ãªã¢ã«ã¿ã€ã ã§æ°ãããšãã»ã³ã·ã£ã«ã¡ãã»ãŒãžãä¿åããããšã§ããããçŸåšã¯å¥ã®æ¹æ³ã«å€æŽããå®æçãªã¿ã€ããŒã«å€æŽããŸãããäžå®ã®æéããšã«ããŒã¿ããªã¯ãšã¹ãããææ°ã®ã¡ãã»ãŒãžã®ã¿ã€ã ã¹ã¿ã³ããèšé²ããŠå€ãã³ã³ãã³ãããã£ã«ã¿ãªã³ã°ããããã«ããŸããã
ãã®æ¹æ³ã¯ç§ã«ãšã£ãŠã¯æããªæ¹æ³ã ãšæããŸãããçŸåšã®ç¶æ³ã§ã¯ããã®æ©èœãå®çŸããä»ã®æ¹æ³ãæãã€ããŸããã
ã³ãã³ã#
ããã¯æ¯èŒçç°¡åã«è§£æ±ºã§ããŸããæå®ãããã°ã«ãŒãã®ã¡ãã»ãŒãžããªãã¹ã³ããã¯ã©ã¹ãã©ããããŠãæååãã¯ã©ã¹ã®ããŒãšãã察å¿ããã¡ãœãããå€ãšããŠãã¡ãã»ãŒãžãåãåã£ããããŒãæž¡ããŠå¯Ÿå¿ããã¡ãœãããå®è¡ããã ãã§ãã
倧ãŸããªå®è£ ã¯ããã§ãå¹³å¡ã§ç¹çãã¹ãç¹ã¯ãããŸããð€¡
æåŸã«ïŒãããããŸã æåŸã§ã¯ãããŸããïŒ#
yuan-bot ã®æ©èœã¯ä»åŸãæ¡å
ãããæ¹åãããäºå®ã§ãïŒãã ããçŸåšã¯ä»äºãå§ãŸã£ãã®ã§ãé²æã¯é
ããªããããããŸããïŒ
ðoicqãæäŸãã API ãšããã¥ã¡ã³ãã«æè¬ããŸã
ðžPower by Magren and made with love
To Be Continued.