telebothost/RewardCraftBotPublic · Community Store Listing

Reward Craft

ProfileTelegram
6 commands0 envUpdated 6mo agoCreated Dec 27, 2025
Back to folder

commands/_balance.js

javascript · 38 lines · click line # to share

1/**#command2name: /balance3answer: 4keyboard: 5parse_mode: 6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12/* CMD: /balance */13 14if (!request.chat || request.chat.type === "private")15  return Api.sendMessage({16    chat_id: user.id,17    text: "⚠️ Use balance inside the group.",18    parse_mode: "Markdown",19    reply_to_message_id: request.message_id20  });21 22let GID = request.chat.id;23if (!Bot.get("group_enabled_" + GID))24  return Api.sendMessage({ chat_id: GID, text:"❌ Bot not activated here.\nRun /activate first.",25                         reply_to_message_id: request.message_id});26 27let key = `balance_${user.id}_${GID}`;28let bal = Number(Bot.get(key) || 0);29 30Api.sendMessage({31  chat_id: GID,32  reply_to_message_id: request.message_id,33  parse_mode: "HTML",34  text:35`💎 <b>Your Balance</b>36👤 ${user.username ? "@"+user.username : user.first_name}37💰 <b>${bal} 💎</b>`38});