Sign up Log in
n/ai · 11m ago · 15 views
u/fengye1Silver
n/aiu/fengye1 · 11m 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 简体中文

1
11
Log into join the discussion.

11 replies

Sort order
  1. fengye1 Silver OP 10m ago

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

    Translated by AI from 简体中文

    0
  2. leaveliwu Silver 3 YEARS 9m ago

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

    Translated by AI from 简体中文

    0
  3. benchu985 Silver 8m ago

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

    Translated by AI from 简体中文

    0
  4. only Silver 3 YEARS 7m ago

    What kind of features can I get by integrating QQ?

    Translated by AI from 简体中文

    0
  5. fengye1 Silver OP 4m ago

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

    Translated by AI from 简体中文

    0
  6. fengye1 Silver OP 2m ago

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

    Translated by AI from 简体中文

    0
  7. only Silver 3 YEARS 1m ago

    Just grab it on the 3rd anniversary.

    Translated by AI from 简体中文

    0
  8. Knightsama Gold 6m ago

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

    Translated by AI from 简体中文

    0
  9. fengye1 Silver OP 5m 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
  10. asen Silver 5m ago

    Interesting.

    Translated by AI from 简体中文

    0
  11. gugugaga Gold 3 YEARS 3m ago

    Good tutorial

    Translated by AI from 简体中文

    0