2021-05-31 21:12:24 +02:00
|
|
|
import { MessageAttachment } from "discord.js";
|
2021-09-25 21:33:59 +03:00
|
|
|
import { Column, Entity, PrimaryColumn, PrimaryGeneratedColumn } from "typeorm";
|
2019-05-04 18:41:50 +03:00
|
|
|
import { StrictMessageContent } from "../../utils";
|
|
|
|
|
|
|
|
@Entity("scheduled_posts")
|
|
|
|
export class ScheduledPost {
|
2021-09-25 21:33:59 +03:00
|
|
|
@PrimaryGeneratedColumn()
|
2019-05-04 18:41:50 +03:00
|
|
|
id: number;
|
|
|
|
|
|
|
|
@Column() guild_id: string;
|
|
|
|
|
|
|
|
@Column() author_id: string;
|
|
|
|
|
|
|
|
@Column() author_name: string;
|
|
|
|
|
|
|
|
@Column() channel_id: string;
|
|
|
|
|
|
|
|
@Column("simple-json") content: StrictMessageContent;
|
|
|
|
|
2021-05-31 21:12:24 +02:00
|
|
|
@Column("simple-json") attachments: MessageAttachment[];
|
2019-05-04 18:41:50 +03:00
|
|
|
|
2020-11-09 20:11:33 +02:00
|
|
|
@Column({ type: String, nullable: true }) post_at: string | null;
|
2019-05-04 18:41:50 +03:00
|
|
|
|
2019-12-01 23:23:34 +02:00
|
|
|
/**
|
|
|
|
* How often to post the message, in milliseconds
|
|
|
|
*/
|
2020-11-09 20:11:33 +02:00
|
|
|
@Column({ type: String, nullable: true }) repeat_interval: number | null;
|
2019-12-01 23:23:34 +02:00
|
|
|
|
2020-11-09 20:11:33 +02:00
|
|
|
@Column({ type: String, nullable: true }) repeat_until: string | null;
|
2019-12-01 23:23:34 +02:00
|
|
|
|
2020-11-09 20:11:33 +02:00
|
|
|
@Column({ type: String, nullable: true }) repeat_times: number | null;
|
2019-12-01 23:23:34 +02:00
|
|
|
|
2019-05-04 18:41:50 +03:00
|
|
|
@Column() enable_mentions: boolean;
|
|
|
|
}
|