3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-06-17 11:25:03 +00:00

Merge branch 'feat/context-menu-mod-menu' of github.com:Obliie/Zeppelin

This commit is contained in:
Lily Bergonzat 2024-01-22 06:06:45 +01:00
commit 91339bb01e
25 changed files with 1146 additions and 235 deletions

View file

@ -83,6 +83,21 @@ export class GuildCases extends BaseGuildRepository {
});
}
async getRecentByUserId(userId: string, count: number, skip = 0): Promise<Case[]> {
return this.cases.find({
relations: this.getRelations(),
where: {
guild_id: this.guildId,
user_id: userId,
},
skip,
take: count,
order: {
case_number: "DESC",
},
});
}
async getTotalCasesByModId(modId: string): Promise<number> {
return this.cases.count({
where: {