ModActions: add !cases cmd without user, tweak old !cases response message
This commit is contained in:
parent
0c974e1d16
commit
147dcc973d
2 changed files with 35 additions and 2 deletions
|
@ -70,6 +70,20 @@ export class GuildCases extends BaseRepository {
|
|||
});
|
||||
}
|
||||
|
||||
async getRecent(count: number): Promise<Case[]> {
|
||||
return this.cases.find({
|
||||
relations: this.getRelations(),
|
||||
where: {
|
||||
guild_id: this.guildId,
|
||||
is_hidden: 0,
|
||||
},
|
||||
take: count,
|
||||
order: {
|
||||
case_number: "DESC",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
async setHidden(id: number, hidden: boolean): Promise<void> {
|
||||
await this.cases.update(
|
||||
{ id },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue