ModActions: !cases without id now returns 5 most recent cases created by you, or the mod specified with --mod

This commit is contained in:
Dragory 2019-02-23 22:40:43 +02:00
parent 7ced26cd19
commit ffafc765d8
2 changed files with 14 additions and 6 deletions

View file

@ -70,11 +70,12 @@ export class GuildCases extends BaseRepository {
});
}
async getRecent(count: number): Promise<Case[]> {
async getRecentByModId(modId: string, count: number): Promise<Case[]> {
return this.cases.find({
relations: this.getRelations(),
where: {
guild_id: this.guildId,
mod_id: modId,
is_hidden: 0,
},
take: count,