feat: add member cache; handle all role changes with RoleManagerPlugin; exit gracefully

This commit is contained in:
Dragory 2023-05-07 17:56:55 +03:00
parent fd60a09947
commit fa50110766
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
48 changed files with 755 additions and 264 deletions

View file

@ -0,0 +1,20 @@
import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
@Entity("member_cache")
export class MemberCacheItem {
@PrimaryGeneratedColumn() id: number;
@Column() guild_id: string;
@Column() user_id: string;
@Column() username: string;
@Column({ type: String, nullable: true }) nickname: string | null;
@Column("simple-json") roles: string[];
@Column() last_seen: string;
@Column({ type: String, nullable: true }) delete_at: string | null;
}

View file

@ -14,5 +14,5 @@ export class PersistedData {
@Column() nickname: string;
@Column() is_voice_muted: number;
@Column({ type: "boolean" }) is_voice_muted: boolean;
}