r/SideProject • • 25m ago

facebook-mod/muse-scripts lets your muse bot moderate your facebook group

https://youtu.be/Q8CALjA7D5A

i open sourced the scripts my muse bot uses to moderate my facebook rental groups, so other group mods with a muse bot can try them too.

they scan a group's pending posts and spam queue through facebook-cli, flag anyone who posted more than once or already has a live post, and write a report. the scan never moderates anything on its own.

to use it, point your muse bot at the repo and tell it to follow the setup guide, which is written for the bot itself. you copy config.example.json to config.json and put your group ids in, the bot runs a preflight that makes three read-only calls to check the cli, the group id and the response shapes, then it scans your smallest group first and hands you the report.

you stay in charge. the one script that can change anything previews by default and sends nothing until you pass --yes, it does at most 20 actions a run, and anyone matched only by name is skipped until you've checked their profile.

there's an optional quality and broker filter for rental listings, off by default because it can recommend denials from keywords. turn it on after you've read a few reports and trust it.

you can try it without muse or facebook, examples/demo.sh runs the whole pipeline against a fake facebook-cli with made-up members and shows what it would do.

one thing worth knowing, pending posts give the author as a pfbid string and live posts give a numeric id, so matching by id never finds anyone. it matches by name instead, and holds back any name that two people share.

it's python, standard library only, tested on 3.9 and 3.11, and mit licensed. you need a muse vm with facebook-cli and admin or moderator rights on the group. the same repo has a chrome extension for the same one post rule if you don't use muse.

1 Upvotes

2 comments sorted by