3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 20:35:02 +00:00

Add repeat options for scheduled posts

This commit is contained in:
Dragory 2019-12-01 23:23:34 +02:00
parent 646156344a
commit 2ff65e89fd
7 changed files with 320 additions and 113 deletions

View file

@ -55,6 +55,8 @@
"MEMBER_MUTE_REJOIN": "⚠ Reapplied active mute for {userMention(member)} on rejoin",
"SCHEDULED_MESSAGE": "⏰ {userMention(author)} scheduled a message to be posted to {channelMention(channel)} on {date} at {time} (UTC)",
"SCHEDULED_REPEATED_MESSAGE": "⏰ {userMention(author)} scheduled a message to be posted to {channelMention(channel)} on {date} at {time} (UTC), repeated {repeatDetails}",
"REPEATED_MESSAGE": "⏰ {userMention(author)} scheduled a message to be posted to {channelMention(channel)} {repeatDetails}",
"POSTED_SCHEDULED_MESSAGE": "\uD83D\uDCE8 Posted scheduled message (`{messageId}`) to {channelMention(channel)} as scheduled by {userMention(author)}",
"BOT_ALERT": "⚠ {tmplEval(body)}",

View file

@ -38,4 +38,8 @@ export class GuildScheduledPosts extends BaseGuildRepository {
guild_id: this.guildId,
});
}
async update(id: number, data: Partial<ScheduledPost>) {
await this.scheduledPosts.update(id, data);
}
}

View file

@ -59,4 +59,7 @@ export enum LogType {
BOT_ALERT,
AUTOMOD_ACTION,
SCHEDULED_REPEATED_MESSAGE,
REPEATED_MESSAGE,
}

View file

@ -22,5 +22,14 @@ export class ScheduledPost {
@Column() post_at: string;
/**
* How often to post the message, in milliseconds
*/
@Column() repeat_interval: number;
@Column() repeat_until: string;
@Column() repeat_times: number;
@Column() enable_mentions: boolean;
}