3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-20 16:25:03 +00:00

Tweak counter reset logic

This commit is contained in:
Dragory 2021-05-03 20:42:43 +03:00
parent ed10b8753e
commit 238c0b7da6

View file

@ -529,12 +529,9 @@ export class GuildCounters extends BaseGuildRepository {
}
async resetAllCounterValues(counterId: number): Promise<void> {
await this.counterValues.delete({
counter_id: counterId,
});
await this.counterTriggers.delete({
counter_id: counterId,
// Foreign keys will remove any related triggers and counter values
await this.counters.delete({
id: counterId,
});
}
}