mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-11-05 03:29:49 +01:00
fix(arabot): fix message count information
This commit is contained in:
parent
528f592733
commit
d7fd0753a5
@ -128,7 +128,7 @@ export class RankCommand extends Command {
|
||||
{ name: 'Rank', value: `${rank.rank}` },
|
||||
{ name: 'Level', value: `${rank.level} (${rank.xpNextLevel}/${xpNextLevel} XP)`, inline: true },
|
||||
{ name: 'Total XP', value: `${rank.xp}`, inline: true },
|
||||
{ name: 'Total messages', value: `${rank.xpNextLevel}` },
|
||||
{ name: 'Total messages', value: `${rank.messages}` },
|
||||
);
|
||||
|
||||
info.success = true;
|
||||
|
||||
@ -15,6 +15,7 @@ export async function getUser(userId: Snowflake) {
|
||||
xp: true,
|
||||
xpForNextLevel: true,
|
||||
level: true,
|
||||
messageCount: true,
|
||||
},
|
||||
});
|
||||
return user;
|
||||
@ -91,6 +92,7 @@ export async function getRank(userId: Snowflake) {
|
||||
level: 0,
|
||||
xp: 0,
|
||||
xpNextLevel: 0,
|
||||
messages: 0,
|
||||
};
|
||||
|
||||
if (user === null) {
|
||||
@ -111,6 +113,7 @@ export async function getRank(userId: Snowflake) {
|
||||
info.level = user.level;
|
||||
info.xp = user.xp;
|
||||
info.xpNextLevel = user.xpForNextLevel;
|
||||
info.messages = user.messageCount;
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user