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

Made it possible to list all alerts and delete them

Might be needed since you can potentially set reminders for far far in the future
This commit is contained in:
Nils Blömeke 2019-06-28 23:26:24 +02:00
parent 913120a1fe
commit 3174425083
2 changed files with 53 additions and 3 deletions

View file

@ -34,6 +34,15 @@ export class GuildVCAlerts extends BaseGuildRepository {
});
}
async getAlertsByRequestorId(requestorId: string): Promise<VCAlert[]> {
return this.allAlerts.find({
where: {
guild_id: this.guildId,
requestor_id: requestorId,
},
});
}
async delete(id) {
await this.allAlerts.delete({
guild_id: this.guildId,