15 Commits

Author SHA1 Message Date
4bb267f990 merge upstream
All checks were successful
Build Dev instance / build (push) Successful in 1m15s
2026-03-10 15:38:47 +11:00
b602e654ec why wont these workflows stay up gahdamn
All checks were successful
Build Dev instance / build (push) Successful in 1m40s
2026-03-06 17:15:51 -05:00
732ad36bba Add unique index migration (#34)
* add migration to delete duplicates that currently exist in the db

* change model and migration to add a unique index constraint to id and name

* renamed unique index name to be readable

* redid model and migration to use @Unique instead of @Index

* remove //Here comment

---------

Co-authored-by: Aster Fialla <asterfialla@gmail.com>
2026-03-06 16:52:26 -05:00
8446559bfb Delete duplicate members migration (#33)
* add migration to delete duplicates that currently exist in the db

* added a name attribute for consistency

---------

Co-authored-by: Aster Fialla <asterfialla@gmail.com>
2026-03-06 16:43:44 -05:00
14ef1581c1 fix: memberRepo methods syntax (#35)
* rearranged update member field and remove member to match expected structure in typeORM

* update docstring

* change insert to save in memberRepo

* added command in package.json

---------

Co-authored-by: Aster Fialla <asterfialla@gmail.com>
2026-03-06 16:39:23 -05:00
10eab6de74 fix: changed property reference for createMember in repo (#32)
fix for createMember object references (was referencing non-existent properties)

Co-authored-by: Aster Fialla <asterfialla@gmail.com>
2026-03-05 13:16:29 -05:00
d8682c2a1b i forgot to git add data-source.ts 🤦 2026-03-05 17:25:39 +11:00
20e8564c15 added .env with examples, updated data-source to be access a docker container instead of relying on loopback 2026-03-05 17:22:22 +11:00
78cda7d3c4 fix: update dockerfile to run npm start (#31)
fix: update dockerfile to run npm start (which runs ts-node) instead of node

Co-authored-by: Aster Fialla <asterfialla@gmail.com>
2026-03-03 07:43:25 -05:00
21587dcb7a fix: update message helper reference hotfix (#30)
* forgot to update a reference in messageHelper to memberRepo instead of memberHelper

* turned off data-source logging

---------

Co-authored-by: Aster Fialla <asterfialla@gmail.com>
2026-03-02 08:50:41 -05:00
aeb7d88ee9 feat: Add migration to migrate existing data to new member table (#29)
added migration to fill new Member table with data from Members

Co-authored-by: Aster Fialla <asterfialla@gmail.com>
2026-03-01 22:10:03 -05:00
8fe53563d0 feat: add db migrations with typeORM (#28)
* adding typescript packages for typeORM

* add typeORM initial files

* updating package scripts

* updating compose.yaml to have an exposed port for the postgres

* modifying setup for typeORM

* update database stuff and and package.json to help generate migrations

* made models and migrations in typeORM

* delete unneeded database.js

* made database pattern ignored by jest

* remove sequelize

* separate member repo from member helper

* not sure why i made everything numbers in the model but it's fixed now

* edited package.json script

* remove unused index.ts

* adjusted files to reference repository correctly and appdatasource

* made appdatasource export as named

* removed start-db script

* added init to appdatasource in bot.js

* migrations finally!

* new migration matching model names I want

* updating tests

* removing testpathignore patterns since it seems to be unecessary?

* adjusting migrations to match current schema

* removed reference to secrets file

* delete old migration

* Revert "delete old migration"

This reverts commit db1efa39a7a80d8976878856250ccaac6a753ab2.

* Revert "adjusting migrations to match current schema"

This reverts commit ef89a83f6a2ef0643d6ace0a3fcf9c40f4bc6dd6.

* just deleted system creation since it's got nothing in it anyway

* renamed memberRepository to memberRepo for consistency

* added await back to parseMemberCommand call to memberArgumentHandler

* changed call to memberHelper.getMembersByAuthor to memberRepo

* renamed repo updateMemberValue to updateMemberField

* removed throw references in repo docstrings

* remove unneeded subscriber directory ref

* changed createdAt and updatedAt columns to be auto-generated

made member table have timezone

* changed casing of isInitialized in mock for bot.js

* removed % from ILike query so that it doesn't match substrings/wildcard

* renamed some stray updateMemberValue in mocks -> updateMemberField

---------

Co-authored-by: Aster Fialla <asterfialla@gmail.com>
2026-03-01 21:25:49 -05:00
d14e89e8b2 Fix: Further converting ES6 to CJS - Making exports named instead of default (#26)
* adding to git ignore

* making imports named not default to not break all my tests

* adjusted setup for memberhelper test

---------

Co-authored-by: Aster Fialla <asterfialla@gmail.com>
2026-02-28 15:28:27 -05:00
39a7115803 Converting ES6 back to CJS (#25)
converting back to cjs

Co-authored-by: Aster Fialla <asterfialla@gmail.com>
2026-02-28 14:39:32 -05:00
Laika Bozhko
72b70f5175 Update dockerfile for standalone deployment (#23)
* Add files via upload

* Update Docker image for pluralflux service

* removing unnecessary network and container name definitions

---------

Co-authored-by: Aster Fialla <asterfialla@gmail.com>
2026-02-28 14:37:59 -05:00
4 changed files with 4 additions and 9 deletions

View File

@@ -6,8 +6,6 @@ on:
pull_request: pull_request:
branches: ["main"] branches: ["main"]
workflow_dispatch:
jobs: jobs:
build: build:

View File

@@ -7,6 +7,8 @@ PluralFlux is a proxybot akin to PluralKit and Tupperbox, but for [Fluxer](https
[Sponsor the project](https://github.com/sponsors/pieartsy) [Sponsor the project](https://github.com/sponsors/pieartsy)
If it's not running at the moment, it's because my computer crashed or something. I'm looking to move running it to a somewhat more permanent solution.
## Commands ## Commands
All commands are prefixed by `pf;`. Currently only a few are implemented. All commands are prefixed by `pf;`. Currently only a few are implemented.

View File

@@ -22,5 +22,4 @@ services:
volumes: volumes:
- pgadmindata:/var/lib/pgadmin - pgadmindata:/var/lib/pgadmin
volumes: volumes:
pgdata: pgdata:
pgadmindata:

View File

@@ -10,7 +10,6 @@ const { AppDataSource } = require("../database/data-source");
env.config(); env.config();
const token = process.env.FLUXER_BOT_TOKEN; const token = process.env.FLUXER_BOT_TOKEN;
const debug = process.env.debug;
if (!token) { if (!token) {
console.error("Missing FLUXER_BOT_TOKEN environment variable."); console.error("Missing FLUXER_BOT_TOKEN environment variable.");
@@ -64,15 +63,12 @@ module.exports.handleMessageCreate = async function(message) {
} }
} }
catch(error) { catch(error) {
if(debug){console.error("An error occurred at unix timestamp " + Date.now() + "while processing the command: " + message + " with error:" + error);} console.error(error);
else{console.error(error);}
process.exit(2); //need this for now just to make sure the bot continues to restart on errors, since it would seem that fluxer.js doesn't define custom error types. TODO: map out some exit codes
} }
} }
client.on(Events.Ready, () => { client.on(Events.Ready, () => {
console.log(`Logged in as ${client.user?.username}`); console.log(`Logged in as ${client.user?.username}`);
if(debug){console.log(Date.now() + `: Currently running in debug mode!`)}
}); });
let guildCount = 0; let guildCount = 0;