6306
Welcome to Bots.Business chat Also known as (BB chat) 😊 It Q&A (question & answer) not CPD ( Copy&Past Development) chat -------- ❓ Help https://help.bots.business http://app.bots.business
100% That flagged wallet address belongs to @coderajinkya 😂
But once again, no proofs
Here are the exact places in your code that I modified, separated into "Before" (how it was originally) and "After" (how I fixed it) sections:
1. API Error Handling (Fixing the Bot Crash)
This code was added to prevent the bot from crashing when the API fails to return data for a specific coin (like GRAM).
Before:
let data = JSON.parse(content).RAW;
let priceFrom = data[fromCoin].USD.PRICE;
let priceTo = data[toCoin].USD.PRICE;
let parsedContent = JSON.parse(content);
// Newly added Error Handling
if (!parsedContent || !parsedContent.RAW || !parsedContent.RAW[fromCoin] || !parsedContent.RAW[toCoin]) {
Api.editMessageText({
message_id: request.message.message_id,
text: `❌ <b>API Error:</b> Price data for ${fromCoin} or ${toCoin} is not available. API might not support this coin.`,
parse_mode: "html",
reply_markup: { inline_keyboard: [[{ text:"🔙 Back", callback_data:"/start"}]] }
});
return;
}
let data = parsedContent.RAW;
let priceFrom = data[fromCoin].USD.PRICE;
let priceTo = data[toCoin].USD.PRICE;
let oldVolume = Bot.getProperty(volumeKey) 0;
let count = Bot.getProperty("swap_total_count") 0;
let history = Bot.getProperty(historyKey) [];
let fName = displayNameMap[fromCoin] fromCoin;
let oldVolume = Bot.getProperty(volumeKey) || 0;
let count = Bot.getProperty("swap_total_count") || 0;
let history = Bot.getProperty(historyKey) || [];
let fName = displayNameMap[fromCoin] || fromCoin;
)
In JavaScript, when you want to insert variables directly into a string (Template Literals), you must wrap the text in backticks (). These were missing in your code, which caused a syntax error.let fEmoji = emojiMap[fromCoin] ? <tg-emoji emoji-id="${emojiMap[fromCoin]}">🪙</tg-emoji> : "🪙";
let tEmoji = emojiMap[toCoin] ? <tg-emoji emoji-id="${emojiMap[toCoin]}">🪙</tg-emoji> : "🪙";
let txt = <tg-emoji emoji-id="5402186569006210455">💱</tg-emoji> Market order ${orderID}To sell ${fEmoji} <b>${amount} ${fName}</b> ($${totalUSD.toFixed(6)}) in pair <b>${fName}/${tName}</b> Total received ${tEmoji} <b>${finalReceiveAmount.toFixed(6)} ${tName}</b> ($${receiveUSD.toFixed(6)})<i>Swap Fee: $${feeUSD.toFixed(2)}</i>;
let fEmoji = emojiMap[fromCoin] ? `<tg-emoji emoji-id="${emojiMap[fromCoin]}">🪙</tg-emoji>` : "🪙";
let tEmoji = emojiMap[toCoin] ? `<tg-emoji emoji-id="${emojiMap[toCoin]}">🪙</tg-emoji>` : "🪙";
let txt = `<tg-emoji emoji-id="5402186569006210455">💱</tg-emoji> Market order ${orderID}
To sell ${fEmoji} <b>${amount} ${fName}</b> ($${totalUSD.toFixed(6)}) in pair <b>${fName}/${tName}</b>
Total received ${tEmoji} <b>${finalReceiveAmount.toFixed(6)} ${tName}</b> ($${receiveUSD.toFixed(6)})
<i>Swap Fee: $${feeUSD.toFixed(2)}</i>`;
Читать полностью…
For investment and gambling websites and bots, inbox me.
Читать полностью…
Looking for bot developer as a friend:) ❤️
Let's work together
I am also Devloper but not Pro in bot making just i can exchange client
@Paradox0x0 sur apke gc ke bachhe to dar rahe he merese use bolo mt dare me unko kuch nahi kruga😭
Читать полностью…
Ban karne sai samne wala chutiya nhi hota he might hain personal issues. Aur agar yehi reason hoga tb toh chutiya wali hrqkt hain
Future ki mt karo baat ek chiz implement karne mai pata nhin kitne janam lagte hain 🥲
legend arrives, itne dino se kaha the ADITYA BRO, aur apna vo spam tag wala kaha gaya
Читать полностью…
Yes, we had a member who took several transfers. I don't know why he did this, as he could have received a higher prize with one account.
Читать полностью…
https://metal-season-3-reward-distribution-report.tiiny.site
Nice @BotsBusinessAdmin 👍
+6 💎 from admin.
You have: 6💎
⚠️ Restrictions - possible punishments (read mode only):Читать полностью…
- 8-hour -💎 -1 BBP.
- 24-hour -💎 -3 BBP.
- 1-week -💎 -5 BBP.
- Permanent -💎 -8 BBP.
You have no current punishments.
Tg Limit Remove Method For Sell In Cheap
Читать полностью…
/*CMDcommand: /swap_confirm_priceneed_reply: false*/let orderID = params;let fromCoin = User.getProperty("swap_from_coin");let toCoin = User.getProperty("swap_to_coin");let amount = parseFloat(User.getProperty("swap_amount"));let receiveAmount = parseFloat(User.getProperty("swap_receive_amount"));let data = JSON.parse(content).RAW;let priceFrom = data[fromCoin].USD.PRICE;let priceTo = data[toCoin].USD.PRICE;// ===== USD CALC =====let totalUSD = amount * priceFrom;// ✅ SMART FEE SYSTEM (0.03 → 0.10 MAX)let feeUSD = totalUSD * 0.005;if(feeUSD < 0.03) feeUSD = 0.03;if(feeUSD > 0.10) feeUSD = 0.10;// ✅ Convert fee to receiving coinlet feeInCoin = feeUSD / priceTo;// ✅ Final receive after feelet finalReceiveAmount = receiveAmount - feeInCoin;// USD after feelet receiveUSD = finalReceiveAmount * priceTo;// ===== BALANCE CHECK =====let bal = Libs.ResourcesLib.userRes(fromCoin);if(bal.value() < amount){ Api.editMessageText({ message_id: request.message.message_id, text: "❌ Insufficient balance", parse_mode: "html", reply_markup: { inline_keyboard: [[{ text:"🔙 Back", callback_data:"/start"}]] } }); return;}// ===== EXECUTE SWAP =====bal.remove(amount);Libs.ResourcesLib.userRes(toCoin).add(finalReceiveAmount);// ===== SAVE VOLUME =====let volumeKey = "swap_volume_" + user.telegramid + "_" + fromCoin;let oldVolume = Bot.getProperty(volumeKey) 0;Bot.setProperty(volumeKey, oldVolume + amount, "float");let count = Bot.getProperty("swap_total_count") 0;Bot.setProperty("swap_total_count", count + 1, "integer");// ===== DISPLAY MAP =====const displayNameMap = { F: "CGATE" };const emojiMap = { BTC:"5409133571233319295", ETH:"5406930321729948822", BNB:"5406671889252781489", SOL:"5407016676342401484", TON:"5406976471153545018", USDT:"5406841020769936275", USDC:"5406575600380974539", TRX:"5406978786140918829", NOT:"5408937007760054197", DOGS:"5341347975006280049", MAJOR:"5409294383398818032", HMSTR:"5451668831388850232", F:"6073537996580200099", POL:"5291760653428597830", GRAM:"5406906330042634563", PEPE:"5406867920150108987", PI:"6127486367820686175", PX:"5449478947823705232"};// ===== SAVE SWAP HISTORY CLEAN DATA =====let now = new Date();let utc = now.getTime() + (now.getTimezoneOffset() * 60000);let dhakaTime = new Date(utc + (3600000 * 6));let datePart = dhakaTime.toISOString().slice(0,10);let timePart = dhakaTime.toTimeString().slice(0,8);let historyKey = "swap_history_" + user.telegramid;let history = Bot.getProperty(historyKey) [];// save clean objecthistory.unshift({ from: fromCoin, to: toCoin, amount: amount, receive: finalReceiveAmount.toFixed(6), date: datePart, time: timePart});if(history.length > 10){ history = history.slice(0,10);}Bot.setProperty(historyKey, history, "json");let fName = displayNameMap[fromCoin] fromCoin;let tName = displayNameMap[toCoin] || toCoin;let fEmoji = emojiMap[fromCoin] ?<tg-emoji emoji-id="${emojiMap[fromCoin]}">🪙</tg-emoji>: "🪙";let tEmoji = emojiMap[toCoin] ?<tg-emoji emoji-id="${emojiMap[toCoin]}">🪙</tg-emoji>: "🪙";// ===== FINAL TEXT =====let txt =<tg-emoji emoji-id="5402186569006210455">💱</tg-emoji> Market order ${orderID}To sell ${fEmoji} <b>${amount} ${fName}</b> ($${totalUSD.toFixed(6)}) in pair <b>${fName}/${tName}</b> Total received ${tEmoji} <b>${finalReceiveAmount.toFixed(6)} ${tName}</b> ($${receiveUSD.toFixed(6)})<i>Swap Fee: $${feeUSD.toFixed(2)}</i>;Api.editMessageText({ message_id: request.message.message_id, text: txt, parse_mode: "html", disable_web_page_preview: true, reply_markup: { inline_keyboard: [[{ text:"« WALLET", callback_data:"/wallet"}]] }});
Cannot read properties of undefined (reading 'GRAM') at line 15
mai ek 8bp hack chat bot banane wala hu kuch madad mil sakta h
Читать полностью…
Need smm panel bot
How can I make smm panel bot
@all
Tbc owner ek number ka ma*&rc#₹ hai mujhe group se ban kar diya kyu ki mai bb me admin tha itana kyu jalti hai unki bb se?? Bb se pahale tbc hi use karta tha mai ,aur bat rahi chatne ki to mujhe rewards mile hai to tarif karne me koi galat nahi hai aur future me revenue share bhi hoga ye contests sirf testing hai
Читать полностью…
Bhai itna mt chaat yaar sahi bol raha tujhe rewards mile hain congrats but tujhe bhi pta hain ki ye model rev share nhi hain.
Aur jaha tk baat rahi ki tbc and bb ki comparison ki kamse kam ads ki quality and quantity better hoti hain bio mai daal rakha anujbots.xyz | Doing scams is a choice, not a mistake. Being trusted is a responsibility, not a choice.
Wo ads yahi krte hain Doing scams is a choice
Mai bb and tbc dono use kr chuka the difference is different mindset.