Adds eslint and linted & improved routing for interactions
This commit is contained in:
parent
83209f642c
commit
441715675c
35 changed files with 2091 additions and 463 deletions
|
|
@ -1,13 +1,12 @@
|
|||
import {CronExpression, Event, EventConfiguration, TimedEvent} from "./EventHandler";
|
||||
import {EventConfiguration, TimedEvent} from "./EventHandler";
|
||||
import {Container} from "../Container/Container";
|
||||
import Playdate from "../Database/tables/Playdate";
|
||||
import {PlaydateRepository} from "../Repositories/PlaydateRepository";
|
||||
import {GroupConfigurationHandler} from "../Groups/GroupConfigurationHandler";
|
||||
import {GroupConfigurationRepository} from "../Repositories/GroupConfigurationRepository";
|
||||
import {PlaydateModel} from "../Models/PlaydateModel";
|
||||
import {ChannelId} from "../types/DiscordTypes";
|
||||
import {DiscordClient} from "../Discord/DiscordClient";
|
||||
import {EmbedBuilder, MessageFlags, roleMention, time} from "discord.js";
|
||||
import {EmbedBuilder, roleMention, time} from "discord.js";
|
||||
import {ArrayUtils} from "../Utilities/ArrayUtils";
|
||||
|
||||
export class ReminderEvent implements TimedEvent {
|
||||
|
|
@ -27,9 +26,9 @@ export class ReminderEvent implements TimedEvent {
|
|||
name: "Reminders",
|
||||
}
|
||||
|
||||
cronExpression: CronExpression = "0 9 * * *"
|
||||
cronExpression: string = "0 9 * * *"
|
||||
|
||||
private groupConfigurationRepository: GroupConfigurationRepository
|
||||
private readonly groupConfigurationRepository: GroupConfigurationRepository
|
||||
private playdateRepository: PlaydateRepository
|
||||
private discordClient: DiscordClient
|
||||
|
||||
|
|
@ -72,13 +71,13 @@ export class ReminderEvent implements TimedEvent {
|
|||
return Promise.resolve();
|
||||
}
|
||||
|
||||
return this.sendReminder(playdate, targetChannel, config.locale);
|
||||
return this.sendReminder(playdate, targetChannel);
|
||||
}, this)
|
||||
|
||||
await Promise.all(promises);
|
||||
}
|
||||
|
||||
private async sendReminder(playdate: PlaydateModel, targetChannel: ChannelId, locale: Intl.Locale) {
|
||||
private async sendReminder(playdate: PlaydateModel, targetChannel: ChannelId) {
|
||||
if (!playdate.group) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue