Files
PluralFlux/README.md

44 lines
4.0 KiB
Markdown
Raw Normal View History

2026-02-15 01:47:36 -05:00
# PluralFlux
2026-02-15 01:55:52 -05:00
PluralFlux is a proxybot akin to PluralKit and Tupperbox, but for [Fluxer](https://fluxer.app/). It is written with the [Fluxer.js](https://fluxerjs.blstmo.com/) library.
[Invite it to your server](https://web.fluxer.app/oauth2/authorize?client_id=1471588659706540815&scope=bot&permissions=4503600164498496).
[Join the support server](https://fluxer.gg/WaO6qGdU)
2026-02-17 11:15:34 -05:00
[Sponsor the project](https://github.com/sponsors/pieartsy)
2026-02-15 01:47:36 -05:00
## Commands
All commands are prefixed by `pf;`. Currently only a few are implemented.
- `pf;help` - Sends the current list of commands.
feat: add tests and other such features (#3) * converted import syntax to ES modules removed unused methods * got test sort of working (jest set up is not crashing but also not mocking correctly) * adjusted beforeeach/beforeall so more pass * more correct test setup * converted import syntax to commonJS removed unused methods * got test sort of working (jest set up is not crashing but also not mocking correctly) * adjusted beforeeach/beforeall so more pass * more correct test setup * more correct dockerfile and compose.yaml * Revert "converted import syntax to commonJS" This reverts commit 5ab0d62b * updated jest to sort of work with es6 * separating out enum return from method return * mostly working except for the weirdest error * nevermind it wasn't actually working, gonna move on for now * added babel to convert es modules to cjs * finally figured out issue with tests (referencing the method directly in the test.each calls the real method not the mock in beforeEach()) * setup fixed more * added error handling parseMemberCommand test * renamed db to database more tests and fixing logic for memberhelper * upgraded fluxer.js * moved import to helpers folder * moved import to helpers folder * more tests for member helper * think i fixed weird error with webhook sending error when a user has no members * simplified sendMessageAsAttachment * added return to addFullMember so that addNewMember can reference it properly in strings * test setup for messagehelper and webhookhelper * readded line i shouldn't have removed in sendMessageAsMember * fixed test and logic * added test for memberHelper * updated sendMessageAsAttachment to returnBufferFromText and updated commands/webhookHelper accordingly * added tests for parseProxyTags and updated logic * added "return" so tests dont terminate on failure and deleted env.jest * finished tests for messageHelper! * more cases for messageHelper just in case * updating docstring for messageHelper parseProxyTags * more tests for webhookhelper * deleted extra file added during merge * removed confusing brackets from enum docs * finally mocking correctly * adding more cases to messageHelper tests * updating enums * removed error response when proxy is sent without content * , updated tests for webhookHelper and removed error response when proxy is sent without content * added debounce to count guilds properly * added todo note * added tests for updateDisplayName * edited help message trigger for updatePropic * update message helper test to include space case * update bot to suppress errors from API * fixed bug for import not sending help text, added help text if you type a unrecognized command * updated to be enum * updated member helper and tests * edit enums, tweak import content command * removed unnecessary await and console.log * made it easier to make a member * added nicer error listing to importHelper * updated documentation * Merge branch 'main' of https://github.com/pieartsy/PluralFlux into add-tests --------- Co-authored-by: Aster Fialla <asterfialla@gmail.com>
2026-02-19 21:45:10 -05:00
- `pf;import` - Imports from PluralKit using the JSON file provided by their export command. Importing from other proxy bots is *TBD*. `pf;import` and attach your JSON file to the message. This will only save the fields that are present in the bot currently, not anything else like birthdays or system handles (yet?). **Only one proxy can be set per member currently.**"
2026-02-15 01:47:36 -05:00
- `pf;member` - Accesses the sub-commands related to editing proxy members. The available subcommands are:
feat: add tests and other such features (#3) * converted import syntax to ES modules removed unused methods * got test sort of working (jest set up is not crashing but also not mocking correctly) * adjusted beforeeach/beforeall so more pass * more correct test setup * converted import syntax to commonJS removed unused methods * got test sort of working (jest set up is not crashing but also not mocking correctly) * adjusted beforeeach/beforeall so more pass * more correct test setup * more correct dockerfile and compose.yaml * Revert "converted import syntax to commonJS" This reverts commit 5ab0d62b * updated jest to sort of work with es6 * separating out enum return from method return * mostly working except for the weirdest error * nevermind it wasn't actually working, gonna move on for now * added babel to convert es modules to cjs * finally figured out issue with tests (referencing the method directly in the test.each calls the real method not the mock in beforeEach()) * setup fixed more * added error handling parseMemberCommand test * renamed db to database more tests and fixing logic for memberhelper * upgraded fluxer.js * moved import to helpers folder * moved import to helpers folder * more tests for member helper * think i fixed weird error with webhook sending error when a user has no members * simplified sendMessageAsAttachment * added return to addFullMember so that addNewMember can reference it properly in strings * test setup for messagehelper and webhookhelper * readded line i shouldn't have removed in sendMessageAsMember * fixed test and logic * added test for memberHelper * updated sendMessageAsAttachment to returnBufferFromText and updated commands/webhookHelper accordingly * added tests for parseProxyTags and updated logic * added "return" so tests dont terminate on failure and deleted env.jest * finished tests for messageHelper! * more cases for messageHelper just in case * updating docstring for messageHelper parseProxyTags * more tests for webhookhelper * deleted extra file added during merge * removed confusing brackets from enum docs * finally mocking correctly * adding more cases to messageHelper tests * updating enums * removed error response when proxy is sent without content * , updated tests for webhookHelper and removed error response when proxy is sent without content * added debounce to count guilds properly * added todo note * added tests for updateDisplayName * edited help message trigger for updatePropic * update message helper test to include space case * update bot to suppress errors from API * fixed bug for import not sending help text, added help text if you type a unrecognized command * updated to be enum * updated member helper and tests * edit enums, tweak import content command * removed unnecessary await and console.log * made it easier to make a member * added nicer error listing to importHelper * updated documentation * Merge branch 'main' of https://github.com/pieartsy/PluralFlux into add-tests --------- Co-authored-by: Aster Fialla <asterfialla@gmail.com>
2026-02-19 21:45:10 -05:00
- `new` - Creates a new member to proxy with, for example: `pf;member new jane`. The member name should ideally be short so you can write other commands with it easily. The order of values is `pf;member new [name] [displayname] [proxy] [propic]`, _without brackets_. The name is **required**, but the rest are optional.
Usage notes:
- If anything has spaces, put it in quotes: `"Jane Doe"`
- If anything is unset, and you want to set something after it (for ex: you haven't set a display name, but you want to add a proxy), put the unset value in empty quotes in the same position: "" If you leave it out, the bot will set things wrong.
- The maximum length of a display name is 32 characters.
- You can't use the same proxy for two different members.
- You can also upload an image directly instead of using a url.
Examples:
- Full example: `pf;member new jane "Jane Doe" J:text https://cdn.pixabay.com/photo/2023/10/20/19/07/aster-8330078_1280.jpg`
- Example with gaps: `pf;member new bob "Bob he/him" "" https://cdn.pixabay.com/photo/2016/05/09/11/09/tennis-1381230_1280.jpg
2026-02-15 01:47:36 -05:00
- `remove` - Removes a member based on their name, for example: `pf;member remove jane`.
- `name` - Updates the name for a specific member based on their current name, for ex: `pf;member john name jane`. The member name should ideally be short so you can write other commands with it easily.
2026-02-16 00:25:36 -05:00
- `list` - Lists all members in the system.
2026-02-15 01:47:36 -05:00
- `displayname` - Updates the display name for a specific member based on their name, for example: `pf;member jane "Jane Doe | ze/hir"`.This can be up to 32 characters long. If it has spaces, put it in __double quotes__.
- `propic` - Updates the profile picture for the member. Must be in JPG, PNG, or WEBP format and less than 10MB. The two options are:
1. Pass in a direct remote image URL, for example: `pf;member jane propic <https://cdn.pixabay.com/photo/2020/05/02/02/54/animal-5119676_1280.jpg>`. You can upload images on sites like <https://imgbb.com/>.
2. Upload an attachment directly.
2026-02-15 01:49:20 -05:00
**NOTE:** Fluxer does not save your attachments forever, so option #1 is recommended.
- `proxy` Updates the proxy tag for a specific member based on their name. The proxy must be formatted with the tags surrounding the word 'text', for example: `pf;member jane proxy Jane:text` or `pf;member amal proxy A{text}` This is so the bot can detect what the proxy tags are. **Only one proxy can be set per member currently.**
2026-02-15 01:49:20 -05:00
## Upcoming
2026-02-24 09:23:07 -05:00
Check for, and add, feature requests in the [Issues tracker](https://github.com/pieartsy/PluralFlux/issues).
## LLM note
I do **not** use LLMs or other GenAI to generate code, nor do I ever plan to. _Very_ rarely, I ask questions of LLMs to troubleshoot bugs after search engines/StackOverflow/friends' knowledge has failed me, but that should lessen even more over time. As well, I used the Docker "Gordon" LLM to fix the many errors in my initial docker compose, but now that I have a devops person helping me, that should never happen again.