3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-24 18:15:02 +00:00

initial - tempbans & mutes

This commit is contained in:
metal 2021-09-20 21:39:20 +00:00 committed by GitHub
parent c84d1a0be1
commit 744b9273bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 322 additions and 109 deletions

View file

@ -11,6 +11,14 @@ export class GuildMutes extends BaseGuildRepository {
this.mutes = getRepository(Mute);
}
async getAllTemporaryMutes(): Promise<Mute[]> {
return this.mutes
.createQueryBuilder("mutes")
.where("guild_id = :guild_id", { guild_id: this.guildId })
.andWhere("expires_at IS NOT NULL")
.getMany();
}
async getExpiredMutes(): Promise<Mute[]> {
return this.mutes
.createQueryBuilder("mutes")