Skip to content

Commit 2a6ff9e

Browse files
committed
fixed statics logs
1 parent 3316eac commit 2a6ff9e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const endpoints = {
4444
bot.use((ctx, next) => {
4545
if (!ctx.session) {
4646
console.clear();
47-
visited[ctx.session.lang] += 1;
47+
visited[ctx.session.lang.name] += 1;
4848
for (const [lang, count] of Object.entries(visited)) {
4949
console.log(`${lang}: ${count}`);
5050
}
@@ -61,7 +61,7 @@ const endpoints = {
6161
command: 'start',
6262
action: async (ctx) => {
6363
console.clear();
64-
visited[ctx.session.lang] += 1;
64+
visited[ctx.session.lang.name] += 1;
6565
for (const [lang, count] of Object.entries(visited)) {
6666
console.log(`${lang}: ${count}`);
6767
}

0 commit comments

Comments
 (0)