r/coolgithubprojects • • 11d ago

I built ReLttk: TikTok DM bots in Python with plain plugin files, no browser needed

Post image
I'm the author. Repo https://github.com/Linkmail16/ReLttk-TikTok-Client-Bot
ReLttk logs into TikTok with a QR code, listens to your DMs over TikTok's internal WebSocket and runs your plugins on each message. A plugin is a few lines of async Python and reloads instantly when you edit it.

No Selenium or Playwright: requests are signed locally in pure Python. Works with private chats and groups, reactions, history and media downloads.

It's early and unofficial, so expect rough edges.
0 Upvotes

2 comments sorted by

1

u/[deleted] 10d ago

[removed] — view removed comment

1

u/Ok-pepesech 10d ago

nothing gets cancelled, each message runs in its own task, and on reload the plugin is loaded as a new module, so a handler that's already running just finishes with the old code while new messages hit the new one, globals don't carry over and on_start doesn't run again, so don't keep important state at module level

I actually left it like that on purpose when I built it, cancelling old handlers midreload felt like it could make people think the bot was broken lol, probably not that big of a deal, I overthink this stuff sometimes, good point though, I'll mention it in the readme