vylbot-app/src/database/migrations/3.2.4/1732973911304-createAutoKickConfig.ts
Ethan Lane cdf689f1c5
All checks were successful
Test / build (push) Successful in 13s
Add auto kick functionality (#502)
- Add command to configure the auto kick function
- Added ability to run functions on a cron job
- Added a cron job every hour to check if a user has had a role for a configured amount of time and kick them if they have
    - The function also optionally sends a notice embed at a configured time before the kick

#485

Reviewed-on: #502
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2025-01-03 17:47:16 +00:00

19 lines
659 B
TypeScript

import { MigrationInterface, QueryRunner } from "typeorm";
import MigrationHelper from "../../../helpers/MigrationHelper";
export class CreateAutoKickConfig1732973911304 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
MigrationHelper.Up("1732973911304-createAutoKickConfig", "3.2.4", [
"01-AutoKickConfig-Table",
"02-AutoKickConfig-Key",
], queryRunner)
}
public async down(queryRunner: QueryRunner): Promise<void> {
MigrationHelper.Down("1732973911304-createAutoKickConfig", "3.2.4", [
"01-AutoKickConfig",
], queryRunner)
}
}