mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 20:35:02 +00:00
counters: add !counter view command
This commit is contained in:
parent
78ff2641d4
commit
91fde47c97
4 changed files with 153 additions and 1 deletions
|
@ -477,4 +477,20 @@ export class GuildCounters extends BaseGuildRepository {
|
|||
}));
|
||||
});
|
||||
}
|
||||
|
||||
async getCurrentValue(
|
||||
counterId: number,
|
||||
channelId: string | null,
|
||||
userId: string | null,
|
||||
): Promise<number | undefined> {
|
||||
const value = await this.counterValues.findOne({
|
||||
where: {
|
||||
counter_id: counterId,
|
||||
channel_id: channelId || "0",
|
||||
user_id: userId || "0",
|
||||
},
|
||||
});
|
||||
|
||||
return value?.value;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue