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:
parent
5a4e50b19d
commit
771ed76f64
17 changed files with 818 additions and 204 deletions
|
@ -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: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue