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

feat: Context menu mod menu command

This commit is contained in:
Obliie 2023-07-15 21:34:26 +01:00
parent 5a4e50b19d
commit 771ed76f64
No known key found for this signature in database
GPG key ID: 9189A18F0D5B547E
17 changed files with 818 additions and 204 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: {