mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
Tweak counter reset logic
This commit is contained in:
parent
647c2eb85a
commit
7fc86d34e9
1 changed files with 3 additions and 6 deletions
|
@ -529,12 +529,9 @@ export class GuildCounters extends BaseGuildRepository {
|
||||||
}
|
}
|
||||||
|
|
||||||
async resetAllCounterValues(counterId: number): Promise<void> {
|
async resetAllCounterValues(counterId: number): Promise<void> {
|
||||||
await this.counterValues.delete({
|
// Foreign keys will remove any related triggers and counter values
|
||||||
counter_id: counterId,
|
await this.counters.delete({
|
||||||
});
|
id: counterId,
|
||||||
|
|
||||||
await this.counterTriggers.delete({
|
|
||||||
counter_id: counterId,
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue