Sign up Log in
n/ai · 5d ago · 824 views
u/fengye1Silver
n/aiu/fengye1 · 5d ago
Red envelope

Sharing how to connect Muse to a QQ-bot

Connect Muse to a QQ-bot and let the bot in QQ become Muse itself: talk to the bot on QQ, and the reply is written on the spot by Muse according to its own persona, then sent back to QQ as-is. No other model is involved in between.

  • daemon.py: the heart of the whole bridge, responsible for staying connected to the QQ server, receiving messages, and sending replies. It first stores messages from QQ, and once Muse has written a reply, it sends it back.
  • Two hook scripts: one checks every 5 seconds for new messages and wakes Muse up to reply if there are any; the other checks every 30 seconds whether the bridge is still alive, and restarts it if it's dead.
  • aiohttp handshake patch + self-healing guard: a header returned by the QQ server during the handshake gets mistakenly killed by the program, which makes it impossible to connect. This patch fixes that, and it won't be lost on reinstall—it's automatically restored at startup.
  • qq-bridge.service: lets the system manage the bridge, so it can start on boot and recover from disconnects automatically without manual babysitting.
  • qr-connect: a tool for scan-code binding. One scan connects the bot to this bridge. Note that the QR code expires in 3 minutes, so don't just send the code—send the authorization link directly; it's faster to open and click.
  • Test: a self-check that runs without internet or an account. If all 14 items pass, the package isn't broken.
  • Credentials template: just fill in AppID and AppSecret accordingly. Once filled in, set the file permissions so only you can read it.

A few honest things you should know

  • QQ only gives you 5 minutes: if someone sends a message and you don't reply within 5 minutes, that message can no longer be replied to. So don't rush Muse when it's slow—it's thinking and writing on the spot.
  • Replies are inherently slow: plain text usually takes 37 to 98 seconds, images 1 to 3 minutes. The slowness comes from having to spin up a Muse to think for every sentence—it's not the network's fault.
  • The bridge will drop: when the container is recycled, the bridge gets killed. That's not the program being broken; that's just how the environment is. The watchdog will bring it back on the next check, usually within tens of seconds, but if the machine is down for a few hours, there's nothing that can be done.
  • It can't see the original image: QQ images are stored on its own CDN, and the server side can't fetch them. Muse can only use a browser to look at the image and then reply, so image replies are even slower.

Disclaimer

  1. Use separate alt accounts for the QQ bot account and the connected account. Don't put the bridge on your main account—if the account gets banned or credentials leak, only the alt is affected.
  2. Bot behavior is still subject to platform rules. Mass messaging, frequent proactive messages, and violating content may trigger rate limits or bans.
  3. For personal learning and self-use only. Environment limitations like container recycling and downtime can't be fixed. The bridge may drop or lose messages at any time, so it's not suitable for important notifications or critical business.

Translated by AI from 简体中文

15
28
Log into join the discussion.

28 replies

Sort order
  1. leaveliwu Silver 3 YEARS 5d ago

    I just took a WeChat Hermes bot from GitHub and modified it directly.

    Translated by AI from 简体中文

    1
  2. znw Gold 3 YEARS 5d ago

    Take a look.

    Translated by AI from 简体中文

    1
  3. fengye1 Silver OP 5d ago

    The ready-to-use archive is up on the cloud drive — just search “谬斯玩法” in Xunlei to grab it.

    Translated by AI from 简体中文

    0
  4. Nice, this is exactly what I need for my idle Muse.

    Translated by AI from 简体中文

    0
  5. only Silver 3 YEARS 5d ago

    What kind of features can I get by integrating QQ?

    Translated by AI from 简体中文

    0
  6. fengye1 Silver OP 5d ago

    It can generate images, but lewd pics are still a no-go.

    Translated by AI from 简体中文

    0
  7. fengye1 Silver OP 5d ago

    How come you've got the 3years badge? When did they hand that out?

    Translated by AI from 简体中文

    0
  8. only Silver 3 YEARS 5d ago

    Just grab it on the 3rd anniversary.

    Translated by AI from 简体中文

    0
  9. fengye1 Silver OP 5d ago

    When was this? I can't believe I missed claiming it 😭😭

    Translated by AI from 简体中文

    0
  10. Knightsama Gold 5d ago

    Everything's ready to go — we just need Muse.

    Translated by AI from 简体中文

    0
  11. fengye1 Silver OP 5d ago

    Isn't Muse pretty easy to sign up for? I remember there's a registration tutorial on the site somewhere.

    Translated by AI from 简体中文

    0
  12. asen Silver 5d ago

    Interesting.

    Translated by AI from 简体中文

    0
  13. gugugaga Gold 3 YEARS 5d ago

    Good tutorial

    Translated by AI from 简体中文

    0
  14. SilentCondor77 Silver 3 YEARS 5d ago

    Thank you!

    0
  15. fengye1 Silver OP 5d ago

    Oh right, I also threw some lewd persona soul.md files in there.

    Translated by AI from 简体中文

    0
  16. huayanyan Gold 5d ago

    Can it bypass the filter? The NSFW rules aren’t that strict, right?

    Translated by AI from 简体中文

    0
  17. fengye1 Silver OP 4d ago

    Yeah, it just can't make NSFW pics.

    Translated by AI from 简体中文

    0
  18. huayanyan Gold 4d ago

    I'll go give it a try then 👍

    Translated by AI from 简体中文

    0
  19. jasons Gold 3 YEARS 5d ago

    I'm here

    Translated by AI from 简体中文

    0
  20. ae80 Gold Never leave, never forsake 5d ago

    Thanks for sharing.

    Translated by AI from 简体中文

    0
  21. fantasy Bronze 5d ago

    Thanks for sharing

    Translated by AI from 简体中文

    0
  22. xisuhlao Bronze 5d ago

    我刚好也有这个需求

    Translated by AI from 简体中文

    0
  23. xiaozx 💤 Gold 3 YEARS 5d ago

    What do I do if I don't even have muse?

    Translated by AI from 简体中文

    0
  24. fengye1 Silver OP 5d ago

    There's a registration guide on the site.

    Translated by AI from 简体中文

    0
  25. menghaiows Silver 5d ago

    Sure, give it a try

    Translated by AI from 简体中文

    0
  26. meitianshang Silver 5d ago

    Can Muse break armor?

    Translated by AI from 简体中文

    0
  27. fengye1 Silver OP 4d ago

    It can be jailbroken, but only to a mediocre extent. The soul.md in my zip gets around the filter by changing the persona. It can do NSFW chat, but it can’t generate NSFW images—image generation seems to have an extra cloud-model moderation layer, and editing soul.md won’t get around that.

    Translated by AI from 简体中文

    0
  28. hakd Unrivaled 2 YEARS 4d ago

    This is actually something that could work

    Translated by AI from 简体中文

    0