Skip to content

Commit 9693509

Browse files
committed
feat: bug fixes and improvements
1 parent 0050adf commit 9693509

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/commands/top.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Message } from "../../types/message"
1+
import { Message } from "../../types/message";
22
import log from "../components/utils/log";
33
import { getUsers } from "../components/services/user";
44

@@ -25,10 +25,10 @@ export default async function (msg: Message) {
2525
2626
${user
2727
.sort((a, b) => (b.totalActivity ?? 0) - (a.totalActivity ?? 0))
28-
.slice(0, 30)
28+
.slice(0, 50)
2929
.map((u, index) => {
3030
const displayName =
31-
u.name.length > 9 ? u.name.slice(0, 9) + ".." : u.name;
31+
u.name.length > 12 ? u.name.slice(0, 12) + ".." : u.name;
3232
return `${index + 1}. ${displayName}: ${u.totalActivity} Points`;
3333
})
3434
.join("\n ")}

src/components/services/user.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export async function findOrCreateUser(msg: Message): Promise<boolean> {
2525
if (user) return false;
2626

2727
const contact = await msg.getContact();
28-
if (!contact) return true;
28+
if (!contact) return false;
2929

3030
const countryCode = await contact.getCountryCode();
3131
const about = await contact.getAbout();

0 commit comments

Comments
 (0)