3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-11 04:45:02 +00:00

Add MessageSaver plugin. Fix some buggy queries.

This commit is contained in:
Dragory 2018-11-24 14:01:06 +02:00
parent 50fb696d62
commit ba2ad8a528
8 changed files with 275 additions and 5 deletions

View file

@ -0,0 +1,33 @@
import { Entity, Column, PrimaryColumn } from "typeorm";
import { Message } from "eris";
export interface ISavedMessageData {
attachments: object[];
author: {
username: string;
discriminator: string;
};
content: string;
embeds: object[];
}
@Entity("messages")
export class SavedMessage {
@Column()
@PrimaryColumn()
id: string;
@Column() guild_id: string;
@Column() channel_id: string;
@Column() user_id: string;
@Column() is_bot: boolean;
@Column("simple-json") data: ISavedMessageData;
@Column() posted_at: string;
@Column() deleted_at: string;
}