CampFirePlay/commands/profile.js
Degradin 471fe54715 v5.4
FIRE System distribute points mechanic
2025-01-11 02:15:19 +03:00

36 lines
1.3 KiB
JavaScript

const {
UserModel,
PropertyModel,
expToUp
} = global.config
const {
spacesWithMarkdown,
escape
} = require('../utils')
module.exports = async (ctx) => {
let user = await UserModel.findByPk(ctx.from.id);
let property = await PropertyModel.findByPk(ctx.from.id);
if (!user) return ctx.reply(`Ошибка #1`);
return ctx.replyWithMarkdownV2(`
👤${escape(user.username)} ${user.status == 'bronze' ? `\\[🔺\\]` : ""}${user.status == 'silver' ? `\\[🔹\\]` : ""}${user.status == 'gold' ? `\\[🔸\\]` : ""}${user.status == 'admin' ? "✅" : ""}
🆔: ${ctx.from.id}
📶 Уровень: ${user.level} \\| ${user.exp} / ${expToUp[user.level]}
⏩ Повышается за различные действия\\.
💰 Баланс
${spacesWithMarkdown(user.money)}
🔵 Имущество
🏠 Жилье: ${property.house == 0 ? "Бездомный" : property.house.name}
🚗 Автомобиль: ${property.car1 == 0 ? "Пешком" : escape(property.car1.name)}
📱 Телефон: ${property.mobile == 0 ? "Нет" : property.mobile.name}
`);
}
/*
🔫 Оружие: ${property.weapon == 0 ? "Безоружный" : escape(property.weapon.name)}
🥼 Экипировка: ${property.equipment == 0 ? "Нет" : property.equipment.name}
*/