Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
21 kB
4
Indexable
const { Telegraf, Scenes, session } = require('telegraf');
const stage = new Scenes.Stage();
const express = require('express');
const app = express();
const bot = new Telegraf('6364012404:AAHx0GE4LnlHyPnhjLBF4q_g-9upzjto68k');
bot.use(session());
bot.use(stage.middleware());
let admin = 5626151907;

app.get('/', (req, res) => {
  res.send('Hello World!');
});
// FOR START CODE \\

bot.start(async ctx => {
  const userId = ctx.message.chat.id;
  const msg = ctx.message.text.split(" ");
  const firstName = ctx.message.chat.first_name;
  const lastName = ctx.message.chat.last_name;
  const userName = ctx.message.chat.username;
  let newUser = false;
  if (!newUser) {
    await ctx.telegram.sendMessage(admin, `
<b>โž• New User Joined the Bot</b> 

<b>๐Ÿ‘ค FirstName:</b> ${firstName}
<b>โœ๏ธ LastName:</b> ${lastName}
<b>๐Ÿ‘ถ UserName:</b> @${userName}
<b>๐Ÿ†” User Id:</b> <code>${userId}</code>
`, {
      parse_mode: 'HTML'
    });
    if (msg[1]) {
      let upline = msg[1];
      if (upline != undefined && upline != userId) {
        await ctx.telegram.sendMessage(upline, "โž•* You Just Got a New Referral* " + userId, {
          parse_mode: 'markdown'
        });
      }
    }
  }
  await ctx.replyWithPhoto({
    url: "https://i.ibb.co/sCdFq91/IMG-1351.jpg"
  }, {
    caption: `
<b>๐Ÿ‘‹ Hello </b>${firstName},

<b>๐Ÿ”ฅWelcome to TRON Games Bot๐Ÿ”ฅ</b>

โœจAUTO-PAYMENTS BOTโœจ

<i>This bot lets you earn Tron TRX by simples gaming.</i>

-> โœจ Lottery
-> ๐ŸŽฐ Bet
-> ๐ŸŽฒ Dice
-> โšฝ๏ธ Football
-> ๐ŸŒ€ Twister

<b>Minimum deposit:</b> 1 TRX

<i>๐Ÿ‘‹ Please join our spot channel to continue more details and to continue to our Bot</i>
    `,
    parse_mode: "HTML",
    reply_markup: {
      inline_keyboard: [
        [
          { text: "๐Ÿš€๐Ÿš€ Join Our Channel ๐Ÿš€๐Ÿš€", url: "https://t.me/cartmoreelogs" }
        ],
        [
          { text: "โœ… Continue to Bot", callback_data: "joinbot" }
        ]
      ]
    }
  });
});

// FOR MENU CODE \\

function mainMenu(ctx) {
  let userDetails;
  if (ctx.callbackQuery) {
    userDetails = ctx.callbackQuery.from;
  } else {
    userDetails = ctx.message.chat;
  }
  const userId = userDetails.id;
  let botName = ctx.botInfo.username;
  const firstName = userDetails.first_name;

  ctx.telegram.sendMessage(userId, `
<b>๐Ÿ˜Ž Welcome To @${botName}
Join us now in making money and earn 10x your betting guaranteed.</b>
    
<i>๐Ÿš€ Deposit now to get started</i>`, {
    reply_markup: {
      keyboard: [
        [
          { text: '๐Ÿ‘ค Account Information' }
        ],
        [
          { text: '๐Ÿ“ฅ Add Funds' },
          { text: '๐Ÿงฎ Game Spot' },
          { text: '๐Ÿ“ค Withdraw Funds' }
        ],
        [
          { text: '๐ŸŽ Free Bonus' },
          { text: '๐Ÿ’ผ Set wallet' },
          { text: '๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ฆ Referral' }
        ],
        [
          { text: 'โ“ Help' },
          { text: '๐Ÿ“„ Terms And Conditions' },
          { text: '๐Ÿ“Š Statistics' }
        ]
      ],
      resize_keyboard: true
    },
    parse_mode: 'HTML'
  });
}
// FOR ACCOUNT BALANCE BUTTON \\

bot.hears('๐Ÿ‘ค Account Information', ctx => {
  const userId = ctx.message.chat.id;
  const name = ctx.message.chat.first_name;
  const balance = 0;

  ctx.reply(`
<b>Account Information

๐Ÿคด Name:</b>  ${name}
<b>๐Ÿ†” Acct ID:</b> ${userId}
<b>๐Ÿ’ฐ Balance:</b> ${balance} <b>TRX</b>

<i>๐Ÿš€ Deposit now!!!</i>`, {
    parse_mode: 'HTML'
  });
});

// FOR HELP BUTTON \\

bot.hears('โ“ Help', ctx => {
  const userId = ctx.message.chat.id;
  const firstName = ctx.message.chat.first_name;

  ctx.telegram.sendMessage(userId, `
1.) If You Want To Deposit Then Click On <b>๐Ÿ“ฅ Add Funds</b>

2.) If You Want To Withdraw Then Click On <b>๐Ÿ“ค Withdraw Funds</b>
    
3.) If you want to set a wallet address, click On <b>๐Ÿ’ผ Set wallet</b>
    
4.) To start playing and make a x10, click On <b>๐Ÿงฎ Game Spot</b>
    
5.) To receive free bonuses every day and earn more, Click On <b>๐ŸŽ Free Bonus</b>
    
6.) If you want to earn much more by inviting friends, Click On <b>๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ฆ Referral</b>
    
7.) To know the statistics of the Bot, Click On <b>๐Ÿ“Š Statistics</b>
    
8.) To know the account information, Click On <b>๐Ÿ‘ค Account Information</b>
    
8.) If you want to see our terms and conditions, Click On <b>๐Ÿ“„ Terms And Conditions</b>
    
9.)Transparency with our community. Payments Channel: @TronGamesBotPayments
    
10.) For contacts and questions write to us at: ๐Ÿš’<b>@DogeClick_ORG</b> or Visit our website: www.dogeclick.org - <b>Channel:</b> @DogeClickUpdatesNews
    `,{
    parse_mode: "HTML"
    });
});

// FOR REFERRAL BUTTON \\

bot.hears('๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ฆ Referral', ctx => {
  const userId = ctx.message.chat.id;
  const botName = ctx.botInfo.username;
  const total = 0;

  ctx.telegram.sendMessage(userId, `
<b>๐Ÿค‘ Earn 0.025 Tron TRX for New referral

๐Ÿ”ฅ Your Total Downlines
      ${total} Downlines
    
โœ… Ref Link to share link with your friends: https://t.me/${botName}?start=${userId}</b>`, {
    parse_mode: 'HTML'
  });
});

// FOR STATISTICS BUTTON \\

bot.hears('๐Ÿ“Š Statistics', ctx => {
  const userId = ctx.message.chat.id;
  const botName = ctx.botInfo.username;
  // date
  const date = new Date();
  // total users,deposits and withdraws
  const totalUser = 0;
  const totalDeposits = 0;
  const totalWithdraws = 0;
  // lotteries
  const totalLotteryWins = 0;
  const totalLotteryLoss = 0;
  // total dices
  const totalDiceWins = 0;
  const totalDiceLoss = 0;
  // football stats
  const totalBallWins = 0;
  const totalBallLoss = 0;
  // twister totals
  const totalTwisterWins = 0;
  const totalTwisterLoss = 0;

  ctx.telegram.sendMessage(userId, `
๐Ÿ”ฅ<u> Full Statics Of Bot </u>๐Ÿ”ฅ

<b>โŒ› Bot Uptime: 99.99%
๐Ÿ“† Date Time:</b><i> ${date}</i>

<b>๐Ÿ‘ค Total Users:</b> ${totalUser}
<b>๐Ÿ“ฅ Total Deposits:</b> ${totalDeposits} TRX
<b>๐Ÿ“ค Total Withdraws:</b>  ${totalWithdraws} TRX
<b>------------------------------------------------</b>
โœจ <u>Total Lotteries</u>
๐Ÿค‘ Total Lotteries Winned : ${totalLotteryWins}
๐Ÿ˜ฅ  Total Lotteries Losed : ${totalLotteryLoss}
<b>---------------------------</b>
๐ŸŽฒ<u> Dice Stats</u>
๐Ÿค‘ Total Dice Winned : ${totalDiceWins}
๐Ÿ˜ฅ  Total Dice Losed : ${totalDiceLoss}
<b>---------------------------</b>
โšฝ๏ธ<u> FootBall Stats</u>
๐Ÿค‘ Total FootBall Winned : ${totalBallWins}
๐Ÿ˜ฅ  Total FootBall Losed : ${totalBallLoss}
<b>---------------------------</b>
๐ŸŒ€<u> Twister Stats</u>
๐Ÿค‘ Total Twister Winned : ${totalTwisterWins}
๐Ÿ˜ฅ  Total Twister Losed : ${totalTwisterLoss}`, {
    parse_mode: "HTML"
});
});

// FOR TERMS AND CONDITIONS BUTTON \\

bot.hears('๐Ÿ“„ Terms And Conditions', ctx => {
ctx.telegram.sendMessage(ctx.message.chat.id, `
<b>๐Ÿ“„ <u>Terms And Conditions </u></b>

<b>๐Ÿ“ข Games In This Maybe Be Addictive And Have Righ Risk Of Money Loss

Please Use It At Your Own Risk In Case Of Any Money Loss We Are Not Responsible.</b>
    
<i>To maintain our services, a 5% commission will be charged on all deposits and withdrawals.</i>`, {
    reply_markup: {
      inline_keyboard: [
        [
          {
            text: 'โœ… Verify', callback_data: 'verifyterms'
          },
          {
            text: 'โŒ Decline', callback_data: 'declineterms'
          }
        ]
      ]
    },
    parse_mode: "HTML"
  });
});

// FOR SET WALLET BUTTON \\

bot.hears('๐Ÿ’ผ Set wallet', ctx => {
  const chatId = ctx.message.chat.id;
  let wallet;
  if (!wallet) {
    wallet = 'โŒ Not set'
  }
  ctx.telegram.sendMessage(chatId, "โŒ›* Your Wallet:* `" + wallet + "`", {
    reply_markup: {
      inline_keyboard: [
        [
          { text: 'โš™๏ธ Set / Change Wallet', callback_data: "setwallet" }
        ]
      ]
    },
    parse_mode: 'markdown'
  });
});

// FOR BONUS BUTTON \\

bot.hears('๐ŸŽ Free Bonus', ctx => {
  function canRun() {
    var last_run_at = 1694142786854;
    if (!last_run_at) { return true }
    var minutes = (Date.now() - last_run_at) / 1000 / 60;
    var minutes_in_day = 48 * 60
    var next = minutes_in_day - minutes
    var wait_hours = Math.floor(next / 60)
    next -= wait_hours * 60
    var wait_minutes = Math.floor(next)
    var seconds = Math.floor((next - wait_minutes) * 60)
    if (minutes < minutes_in_day) {
      ctx.reply("*๐Ÿ“› You have already received a bonus Today\n\nโ–ถ๏ธ Come Back After โณ* " + wait_hours + " *h* " + wait_minutes + " *m* "
        + seconds + " *s*", {
        parse_mode: 'markdown'
      });
      return
    }
    return true;
  }
  if (!canRun()) { return }
  //save current time User.setProperty("last_run_at", Date.now(), "integer");
  ctx.reply("๐ŸŽ‰ Congrats , you Received 0.25 TRX ๐ŸŽŠ");
});

// FOR WITHDRAWAL BUTTON \\

bot.hears('๐Ÿ“ค Withdraw Funds', ctx => {
  const balance = 2;
  const wallet =  "tffgggvv";
  const minimum = 1
  if (balance < minimum) {
    ctx.reply("_โŒ You Need Minimum " + minimum + " TRX To Withdraw_", {
      parse_mode: 'Markdown'
    });
  } else if (wallet == undefined || !wallet) {
    ctx.reply("_โŒ Wallet not set_", {
      parse_mode: 'Markdown'
    });
  } else {
    const withdraw = new Scenes.BaseScene("withdraw");
    withdraw.enter( ctx => {
      ctx.reply("_โžก๏ธ Send Trx Amount to Withdraw_", {
        parse_mode: 'markdown'
        });
    });
    withdraw.on('text', ctx => {
      ctx.scene.leave();
      ctx.reply("Wait Processing...");
      

    ////// Rest for withdrawal
    });
    stage.register(withdraw);
    ctx.scene.enter("withdraw");
  }
});

// FOR GAMES STORE BUTTON \\

bot.hears('๐Ÿงฎ Game Spot', ctx => {
  
  ctx.replyWithPhoto({
    url: "https://i.ibb.co/Bsf4kB4/IMG-1352.jpg"
  },{
    caption: "๐Ÿ‘‹ <u>Welcome to our Game Center!</u>\n\n๐ŸŽฎ Here, you can enjoy a variety of exciting games to test your luck and skills.\n๐Ÿš€ Dive into the thrill of our games, including Lottery, Dice, Football, and Twister.\nโœˆ๏ธ Get ready for hours of fun and the chance to win big prizes.\n\n<b>๐Ÿ”ฅ Let the games begin! </b>๐Ÿ”ฅ",
    parse_mode: "HTML",
    reply_markup: {
      keyboard: [
        [
          {
            text: 'โœจ Lottery'
          },
          {
            text: '๐ŸŽฒ Dice'
          }
        ],
        [
          {
            text: 'โšฝ FootBall'
          },
          {
            text: '๐ŸŒ€ Twister'
          }
        ],
        [
          {
            text: 'Back to home โ†ฉ๏ธ'
          }
        ]
      ],
      resize_keyboard: true
    }
  });
});

// FOR BACK BUTTON ON GAME CENTER \\

bot.hears('Back to home โ†ฉ๏ธ', ctx => {
  mainMenu(ctx);
});

// FOR ALL GAMES BUTTON HERE \\

// ------> FOR LOTTERY BUTTON <------- \\
bot.hears('โœจ Lottery', ctx => {
  let balance = parseFloat(2);
  const mini = 1;
  if (balance < mini){
    ctx.reply("_โŒ To Participate In Lottery You Must Have "+mini+" TRX_.",{
      parse_mode: 'markdown'
    });
  }else{
    const lotteryAmount = new Scenes.BaseScene("lotteryAmount");
    lotteryAmount.enter( ctx => {
      ctx.reply("โžก๏ธ _Enter TRX Amount to Participate in the Lottery_.",{
      parse_mode: 'markdown'
    });
    });
    lotteryAmount.on('text', ctx => {
     const amount = parseFloat(ctx.message.text);
      if (isNaN(amount)){
        ctx.reply("_โŒ Enter a Valid Amount_.",{
      parse_mode: 'markdown'
    });
      }else if (balance < amount){
        ctx.scene.leave();
    ctx.reply("_โŒ You Do Not Have Enough Balance to Play_.",{
      parse_mode: 'markdown'
    });
  }else{
        ctx.scene.leave();
///////////// after amount validated asking for guess number////
        const lotteryReturn = amount*2;
        const lotteryGuess = new Scenes.BaseScene("lotteryGuess");
        
        lotteryGuess.enter( ctx => {
          ctx.reply("โš * Lottery Amount:* "+amount+" _TRX_\n\nโžก๏ธ You Will Get "+lotteryReturn+" *TRX* If You Win\n๐Ÿ”ฅ _ Send 5 Digit Number From 1-5_.",{
      parse_mode: 'markdown'
    });
        });
        lotteryGuess.on('text', ctx => {
          const guessGame = ctx.message.text;

          if (isNaN(guessGame)){
            ctx.reply("_โŒ Please Enter a Valid Numbers_.",{
      parse_mode: 'markdown'
    });
          }else if (guessGame.length > 5){
            ctx.reply("_โŒ Please Enter a Number only 5 lengths_.",{
      parse_mode: 'markdown'
    });
          }else if (guessGame.includes("6")||guessGame.includes("7")||guessGame.includes("8")||guessGame.includes("9")||guessGame.includes("0")){
            ctx.reply("_โŒ Please Enter a Number Only From 1 - 5_.",{
      parse_mode: 'markdown'
    });
          }else{
            ctx.scene.leave();
            balance -= amount;
            ctx.replyWithMarkdown("๐Ÿช _Validating your Game ... 3s_");
            
            setTimeout(function (){
              ctx.replyWithMarkdown("_3_");
            },1000);
            
            setTimeout(function (){
              ctx.replyWithMarkdown("_2_")
            },2000);
            setTimeout(function (){
              ctx.replyWithMarkdown("_1_")
            },3000);
            setTimeout(function (){
let c = "";
let arr = ["1", "2", "3", "4", "5"];
let i;

function getRandomItem(arr) {
  var randomIndex = Math.floor(Math.random() * arr.length);
  var item = arr[randomIndex];
  return item;
}
for (i = 0; i < arr.length; i++) {
  var result = getRandomItem(arr);

  if (!c.includes(result)) { 
    c += result;
  } else {
    i = i - 1;
    continue;
  }
}
if (guessGame === c) { 
  ctx.reply("๐ŸŽŠ WoHoo You Win *"+lotteryReturn+"* TRX");
  balance += lotteryReturn;
} else {
  ctx.reply("๐Ÿ˜ญ* Opps*, It's "+c+", _You Lose_ *"+amount+"* _TRX_",{
    parse_mode: "markdown"
  });
}
            },4000);
          }
        });
        stage.register(lotteryGuess);
       ctx.scene.enter("lotteryGuess");   
/////// end of it \\\\\\\\\\\\\
      }
    });

    stage.register(lotteryAmount);
    ctx.scene.enter("lotteryAmount");

  }
});

// ------> FOR DICE BUTTON <------- \\

bot.hears('๐ŸŽฒ Dice', ctx => {
  let balance = 5;
  const mini = 3;
  const diceReturn = 5;
  const diceGame = new Scenes.BaseScene("diceGame");
  diceGame.enter( ctx => {
    ctx.telegram.sendMessage(ctx.chat.id,`
โš  Note: *This game cost ${mini} trx to play and if you win you will get ${diceReturn} trx total else ๐Ÿ˜ช*

๐ŸŽฒ_ Enter a random number between 1 to 6 _๐ŸŽฒ`, {
    parse_mode: 'markdown',
    reply_markup: {
      keyboard: [
        [
          {text: '1'},
          {text: '2'},
          {text: '3'}
        ],
        [
          {text: '4'},
          {text: '5'},
          {text: '6'}
        ],
        [
          {text: '๐ŸŽฒ Dice'},
          {text: 'Back to home โ†ฉ๏ธ'}
        ]
      ],
      resize_keyboard: true
    }
});
  });
  diceGame.on('text', ctx => {
    const guessDice = ctx.message.text;
    if (balance < mini){
      ctx.replyWithMarkdown("*๐Ÿ“ข You have to own at least "+mini+" trx* ...\n_This game cost "+mini+" trx to play!_");
      ctx.scene.leave();
    }else if (guessDice > 0 && guessDice <= 6){
balance -= 3;
ctx.scene.leave();
const sentDice = new Scenes.BaseScene("sentDice");
      
sentDice.enter(async ctx => {
  await ctx.replyWithMarkdown("โžก๏ธ *Guides:* _Click on the below _*Dice (๐ŸŽฒ) *_to send Your Dice_");
  ctx.sendDice();
});
sentDice.on('dice', ctx => {
  ctx.scene.leave();
  const result = ctx.message.dice.value;
ctx.replyWithMarkdown('_๐Ÿช Validating your Dice Result_');

  setTimeout( function (){
    if (parseFloat(result) === parseFloat(guessDice)) {
  ctx.replyWithMarkdown('*๐ŸŽ Congratulations, you have received 5 TRX for winning*\n play again ๐Ÿ˜Ž');
  balance += 5;
} else {
   ctx.replyWithMarkdown('*๐Ÿ”ธ Luck for the next!*');
  ctx.replyWithMarkdown('๐Ÿ˜ช *The correct number was ' + result + '*');
}
  },3000);
});
stage.register(sentDice);    
ctx.scene.enter("sentDice");   
    }else{
      ctx.replyWithMarkdown("*โœจ This is a dice game.*\nโ–ซ๏ธ_Enter numbers 1 through 6 only._");
    }
  });

  stage.register(diceGame);
  ctx.scene.enter("diceGame");
});


// ------> FOR DICE BUTTON <------- \\


bot.hears('โšฝ FootBall', ctx => {
    ctx.telegram.sendMessage(ctx.message.chat.id, `๐ŸŒฟ *Here you can play football and win more trx
๐Ÿ”ฅThe rules are simple: 

 If Result == 6,4,2 You win 2 TRX
 If Result == 5,3,1 You will loose 1 Trx Bet*

_โšฝ FootBall Game Play Price is Only 1 TRX Per Ball Played_`, {
      parse_mode: 'markdown',
      reply_markup: {
        inline_keyboard: [
          [
            {
              text: 'Play โšฝ๏ธ', callback_data: 'startball'
            }
          ],
          [
            {
              text: 'Back to Home',callback_data: 'backtohome'
            }
          ]
        ]
      }
  });
});

// ------> FOR TWISTER BUTTON <------- \\

bot.hears('๐ŸŒ€ Twister', ctx => {
  ctx.telegram.sendMessage(ctx.chat.id, " ๐ŸŒ€ To win, Get a number higher than *5250* \n\n_Select amount to bet with_", {
    parse_mode: 'markdown',
    reply_markup: {
      inline_keyboard: [
        [
          {
            text: "๐ŸŒ€ 1 TRX Twister",
            callback_data: "/lucky1"
          }
        ],
        [  
          {
            text: "๐ŸŒ€ 2 TRX Twister",
            callback_data: "/lucky2"
          }
        ],
        [   
          {
            text: "๐ŸŒ€ 5 TRX Twister",
            callback_data: "/lucky5"
          }
        ]
      ]
    }
  });
});

// ALL GAMES BUTTON FINISH THANK GOD \\

// ALL CALLBACK QUERIES \\

bot.on('callback_query', async ctx => {
  const userId = ctx.callbackQuery.from.id;
  const callback = ctx.callbackQuery.data;

  if (callback === "verifyterms") {
    ctx.answerCbQuery();
    ctx.editMessageText("*โœ… Now You Can Use Bot Now*", {
      parse_mode: "markdown"
    });

  } else if (callback === "declineterms") {
    ctx.answerCbQuery();
    ctx.editMessageText("*โŒ Some Permissions Declined*", {
      parse_mode: "markdown"
    });
  } else if (callback === "joinbot") {
    const member = await ctx.telegram.getChatMember("@cartmoreelogs", userId);
    if (member.status === "left") {
      ctx.answerCbQuery("โš ๏ธ Please join the Channel");
    } else {
      ctx.answerCbQuery("๐Ÿ”ฅ Welcome to the Bot");
      await ctx.deleteMessage();
      mainMenu(ctx);
    }
  }else if (callback === "setwallet") {
    const walletScene = new Scenes.BaseScene("walletScene");
      walletScene.enter(ctx => {
      ctx.editMessageText(`
<b>๐Ÿ“ Enter your TRX wallet address below and it will be saved for all future withdrawals.</b>


<i>You can still change your wallet address later on.</i>`,{
        parse_mode: 'HTML'
});
});
    walletScene.on('text', ctx => {
      const msg = ctx.message.text;
      if (msg.startsWith("T") && msg.length > 30) {
      ctx.reply("*โœ… TRX Address Set To:* `"+ctx.message.text+"`",{
        parse_mode: 'markdown',
        reply_to_message_id: ctx.message.message_id
      });
      ctx.scene.leave();
    }else{
      ctx.reply("โš ๏ธ _Please Send a Valid TRX Address_", {
        parse_mode: 'markdown'
      });
 }
    });
    
  stage.register(walletScene);
  ctx.scene.enter('walletScene');
    
  }else if (callback === "startball"){
    ctx.answerCbQuery();
    let balance = 1;
    const mini = 1;
    if (balance < mini){
      ctx.editMessageText("*โŒ Insufficient Balance*,_ You have only "+balance+" TRX_",{
        parse_mode: 'markdown'
      });
    }else{
      ctx.deleteMessage();
      const result = Math.floor(Math.random() * 6) +1;
      ctx.reply("โšฝ๏ธ");
      setTimeout(async function(){
        
       await ctx.reply("Game result: "+result);

if (result % 2 === 0) {
  
   ctx.reply("You won the game +2 TRX");
  balance += 2;
} else {
  balance -= 1;
  ctx.reply("You lost the game -1 TRX");
  return; 
}
      },1000);
    return}
  } else if (callback === "/lucky1" || callback === "/lucky2" || callback === "/lucky5"){
    ctx.answerCbQuery();
    let balance = 6;
    const wish = String(callback)[6];
    const amount = parseFloat(wish);
    if (balance < amount){
      
      ctx.editMessageText("*โš ๏ธ Not Enough  Balance Please Fund Your Wallet*.\n\n_You Need Atleast "+amount+" TRX_.", {
        parse_mode: 'markdown'
      });
      
    }else{
      const min = 0;
      const max = 7190;
      const real = Math.floor(Math.random() * (max - min + 1)) + min;
      if (parseFloat(real) > parseFloat(5250)){
        ctx.editMessageText("โœ… Number: *"+real+"* ๐ŸŽ‰ _Congratulations  You Won and You received_ *"+amount+"* TRX ๐Ÿ’ต", {
          parse_mode: 'markdown'
        });
        balance += amount;
      }else{
        ctx.editMessageText("โŒ "+real+" Is Less Than 5250\n๐Ÿฅต You Lost *"+amount+" TRX*\n\n๐Ÿ˜Š _You Can Try Again To stand The chance To win More TRX_",{
          parse_mode: 'markdown'
        });
        balance -= amount;
      }
      
    }
  }else{
    ctx.deleteMessage();
    mainMenu(ctx);
}
});


// ALL STOP ALL THANKS TO GOD BOT BY @STARKNIL \\

/*app.post('/depo', (req, res) => {
  
});*/


const port = 3000;
app.listen(port, () => {
  console.log(`Server Running on Port: ${port}`);
});
bot.launch();