Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
2.9 kB
3
Indexable
Never
if (!content) {
  return
}
var info = JSON.parse(content)

var currency = info.currency
var amount = info.amount
var hash = info.hash

//convert from Crypto to BTC 
var amo = CurrencyQuote.convert({ amount: amount, from: currency, to: "BTC" })


var totalinvest = Libs.ResourcesLib.anotherChatRes("totaldepo", "global")
var balance = Libs.ResourcesLib.userRes("balance")
var active = Libs.ResourcesLib.userRes("ai")

var history = User.getProperty("depohistory")
var time = Libs.DateTimeFormat.format(new Date(), "dd/m/yyyy h:M:s T") + "M"

var wallet = User.getProperty("walleta")
var tronp = User.getProperty("tronp2")

if (amo >= 0.1 && amo <= 349) {
  var ret = amo * 1.35

  Bot.sendMessage(`*āœ… New Investment Started in Bot* 

šŸ“† Total Investment Duration: 24 Hours, for a 135%

_šŸ—’ Get paid on Every 24 Hours_

ā±* Payment* 135% every 24 Hours

šŸ’“ *Invested Amount*: ${amo} TRX

šŸ§®* Expected Return*: ${ret} TRX`)

  Api.sendMessage({
    chat_id: "@lkghfc",
    text: `šŸŖ *NEW ${currency} DEPOSIT RECEIVED* šŸŖ

šŸ‘¤ ${user.first_name} 
šŸ†” ${user.telegramid} 
āœØ Amount ${amo}  ${currency}
ā›“ Transaction id 
[${txn_id}](https://api.jobians.top/tx/?c=${currency}&h=${txn_id})

INVITE YOUR FRIENDS AND GET 0.1 TRX šŸŽ`,
    parse_mode: "Markdown",
    disable_web_page_preview: true
  })

  totalinvest.add(+amo)

  balance.add(-amo)
  active.add(+amo)

  Bot.run({
    command: "/sendpro2",
    run_after: 1 * 60 * 60 * 24,
    options: { amount: amo }
  })

  let refUser = Libs.ReferralLib.currentUser.attractedByUser()
  if (refUser) {
    var balanceref = Libs.ResourcesLib.anotherUserRes(
      "balance",
      refUser.telegramid
    )
    var affiliate = Libs.ResourcesLib.anotherUserRes(
      "affiliate",
      refUser.telegramid
    )

    var tdeposit = Libs.ResourcesLib.anotherUserRes(
      "affiliated",
      refUser.telegramid
    )

    var affbo = amo / 15

    balanceref.add(+affbo)
    affiliate.add(+affbo)
    tdeposit.add(+amo)

    Bot.sendMessageToChatWithId(
      refUser.chatId,
      "šŸ¦" +
        affbo.toFixed(4) +
        " TRX Received from referral deposit: " +
        "[" +
        user.first_name +
        "]" +
        "(" +
        "tg://user?id=" +
        user.telegramid +
        ")"
    )
  }

  if (history == undefined) {
    var newh =
      "\n\n*Your Deposit*: " +
      amo +
      " TRX\nā›“ [Transaction Hash](https://tronscan.org/#/transaction/" +
      txn_id +
      ")\nšŸ•„* Investment Started* : " +
      time
    User.setProperty("depohistory", newh, "string")
  } else {
    var nwh =
      "\n\n *Your Deposit*: " +
      amo +
      "  TRX\nā›“ [Transaction Hash](https://tronscan.org/#/transaction/" +
      txn_id +
      ")\nšŸ•„* Investment Started* : " +
      time
    var toal = nwh + history
    User.setProperty("depohistory", toal, "string")
  }
}