Commit Graph

129 Commits

Author SHA1 Message Date
Aster Fialla
69c242350f updated readme 2026-02-20 10:01:56 -05:00
8fc590c062 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
Aster Fialla
d24bcc8438 Added package-lock.json 2026-02-19 21:43:38 -05:00
pieartsy
4f2e893491 Create node.js.yml
Workflow for node.js (hopefully works)
2026-02-17 11:41:30 -05:00
pieartsy
74cab4f91f Update README.md 2026-02-17 11:15:34 -05:00
pieartsy
1661dfd637 Create FUNDING.yml
Added github sponsorship.
2026-02-17 11:14:54 -05:00
Aster Fialla
055ecdf20d removed unneeded code 2026-02-16 13:43:34 -05:00
Aster Fialla
51ada567ce made bot search and query lowercase instead of only applying to uppercase 2026-02-16 13:30:57 -05:00
Aster Fialla
be5505b03c added --help functionality to import command 2026-02-16 13:15:28 -05:00
Aster Fialla
07d4e735eb changed parseProxyTags to filter proxy differently. changed conditional in sendMessageAsMember because obj will never not exist 2026-02-16 12:48:26 -05:00
Aster Fialla
8b709b75ce updated readme and enums 2026-02-16 12:31:44 -05:00
Aster Fialla
6cd34e9c68 adjusted webhook helper to not query twice for member.
adjusted proxy message to just reply to message w/ attachments with "Attachment sent by" instead of sending error message
2026-02-16 12:30:46 -05:00
Aster Fialla
b2fc9f9111 fixed regex to escape proxy tags that match a normal regex 2026-02-16 12:16:06 -05:00
Aster Fialla
b3813d771d tentative adding of system model (not used yet) 2026-02-16 11:09:03 -05:00
Aster Fialla
f19a5ba58c gitignore of env added 2026-02-16 11:08:53 -05:00
Aster Fialla
5a9a2977c6 adding build of whole image to compose 2026-02-16 11:08:41 -05:00
Aster Fialla
b15262e1c5 added .env to bot.js and db.js 2026-02-16 11:08:19 -05:00
Aster Fialla
4ea0a777af actually fixed proxy query 2026-02-16 10:56:40 -05:00
Aster Fialla
a3c3eb1545 added dotenv 2026-02-16 10:36:38 -05:00
Aster Fialla
559da55176 edited addFullMember to throw error if member was not added successfully 2026-02-16 10:36:31 -05:00
Aster Fialla
f169f4d755 adjusted reference to wrong file with import and enums 2026-02-16 10:32:14 -05:00
Aster Fialla
32adf7b6ef move list --help check to parseMemberCommand 2026-02-16 09:34:07 -05:00
Aster Fialla
1db4ab37dc removed nonexistent e 2026-02-16 00:42:15 -05:00
Aster Fialla
fa0de17724 edited member helper to notify only 25 members are supported currently in list 2026-02-16 00:40:40 -05:00
Aster Fialla
99bfdf685b updated readme 2026-02-16 00:25:36 -05:00
Aster Fialla
0a7057ef63 list enum documentation 2026-02-16 00:23:56 -05:00
Aster Fialla
58912f382c edited remove to not "remove" nonexistent members 2026-02-16 00:22:55 -05:00
Aster Fialla
375601cca7 added --help to list 2026-02-16 00:21:46 -05:00
Aster Fialla
e67a10fa79 allows invalid propic to still be imported 2026-02-16 00:16:38 -05:00
Aster Fialla
b83325785f removed ability to send attachments since i think fluxer deletes them from the server when a message is deleted :( 2026-02-16 00:11:57 -05:00
Aster Fialla
49cab523f0 removed ability to send attachments since i think fluxer deletes them from the server when a message is deleted :( 2026-02-16 00:11:11 -05:00
Aster Fialla
e1dbba9043 hopefully ACTUALLY writes and sends file now... 2026-02-15 23:18:29 -05:00
Aster Fialla
fa86606fb4 added helper to rerun app when it crashes 2026-02-15 23:09:27 -05:00
Aster Fialla
cf37508ee4 docstrings and changed expected parameters for messageHelper parseProxyTags 2026-02-15 21:25:07 -05:00
Aster Fialla
38105d910e deleted old dockerfile 2026-02-15 21:24:27 -05:00
Aster Fialla
fe05b93ac7 adding webhook sending of attachment as an embed since sending image directly apparently doesn't work in fluxer yet 2026-02-15 21:24:19 -05:00
Aster Fialla
964b5ec32a actually writing to created file if import fails 2026-02-15 21:18:40 -05:00
Aster Fialla
cebf14a2f5 updated readme and docs 2026-02-15 16:52:08 -05:00
Aster Fialla
dafbafeec6 if parsing member command returns null, don't send anything. 2026-02-15 16:48:51 -05:00
Aster Fialla
8f70960079 removed some overzealous error handling 2026-02-15 16:48:22 -05:00
Aster Fialla
75dba413b8 turned off logging for sequelize since i don't gotta see all that 2026-02-15 16:21:00 -05:00
Aster Fialla
f81da5ac27 added handler to send string as an attachment if it's too long 2026-02-15 16:20:42 -05:00
Aster Fialla
be83e8d629 removed unnecessary console.logs 2026-02-15 15:57:28 -05:00
Aster Fialla
9bff32456c changed error handling to not return error when database returns null as sometimes we want that 2026-02-15 15:57:08 -05:00
Aster Fialla
ba623b0b78 removed unused status variable 2026-02-15 15:15:04 -05:00
Aster Fialla
85d876f660 removed gateway check since I probably do not need it 2026-02-15 15:05:08 -05:00
Aster Fialla
db5a7398ce edited readme 2026-02-15 02:17:51 -05:00
Aster Fialla
ff84a637b2 edited enum reference to ADD 2026-02-15 02:17:05 -05:00
Aster Fialla
8762e41a0a changed add command back to new because dang. 2026-02-15 02:12:59 -05:00
Aster Fialla
3512f07def updated readme 2026-02-15 01:55:52 -05:00