telegram bot, cannot figure out the problem

I been struggling to deploy my bot. Im getting an error message. Im also having trouble with Jest.
These are const on my .env file/ or variables I dont know exactly what its called. If someone can please guide me and let me know how to fix this.

const Web3 = require('web3');
const TelegramBot = require('node-telegram-bot-api');
require('dotenv').config();

// Load environment variables
const token = process.env.TELEGRAM_BOT_TOKEN;
const infuraEndpoint = process.env.INFURA_OR_ALCHEMY_ENDPOINT;
const contractAddress = process.env.CONTRACT_ADDRESS;
const privateKey = process.env.PRIVATE_KEY;
const chatId = process.env.TELEGRAM_CHAT_ID;

const bot = new TelegramBot(token, { polling: true });
const web3 = new Web3(infuraEndpoint);

// Replace with your contract's ABI
const abi = [
    {
        "inputs": [],
        "name": "get",
        "outputs": [
            {
                "internalType": "uint256",
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "value",
                "type": "uint256"
            }
        ],
        "name": "set",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    }
];
const account = web3.eth.accounts.privateKeyToAccount(privateKey);
web3.eth.accounts.wallet.add(account);
web3.eth.defaultAccount = account.address;

const contract = new web3.eth.Contract(abi, contractAddress);

// Function to handle trade confirmation
async function handleTradeConfirmation(chatId, token, amountIn, minAmountOut) {
    const message = `Do you want to trade ${web3.utils.fromWei(amountIn, 'ether')} ETH for ${token}? Minimum tokens expected: ${web3.utils.fromWei(minAmountOut, 'ether')}`;

    // Send confirmation message
    const sentMessage = await bot.sendMessage(chatId, message, {
        reply_markup: {
            inline_keyboard: [
                [{ text: 'Confirm', callback_data: 'confirm' }],
                [{ text: 'Cancel', callback_data: 'cancel' }]
            ]
        }
    });

    // Listen for user's response
    const callbackListener = async (callbackQuery) => {
        const data = callbackQuery.data;
        const messageId = callbackQuery.message.message_id;

        if (data === 'confirm') {
            // Execute the trade
            try {
                await contract.methods.confirmTrade(token, amountIn, minAmountOut)
                    .send({ from: account.address, gas: 200000 });
                bot.sendMessage(chatId, 'Trade executed successfully.');
            } catch (error) {
                bot.sendMessage(chatId, 'Error executing trade: ' + error.message);
            }
        } else {
            bot.sendMessage(chatId, 'Trade canceled.');
        }

        // Remove the inline buttons
        bot.editMessageReplyMarkup({}, { chat_id: chatId, message_id: messageId });
        bot.removeListener('callback_query', callbackListener);
    };

    bot.on('callback_query', callbackListener);
}

// Listen for TradeDetails event
contract.events.TradeDetails()
    .on('data', async (event) => {
        const { token, amountIn, minAmountOut } = event.returnValues;
        await handleTradeConfirmation(chatId, token, amountIn, minAmountOut);
    })
    .on('error', (error) => {
        console.error('Error listening to TradeDetails event:', error);
    });

console.log('Bot is running...');

THIS IS A ERROR MESSAGE I GOT TRYING TO RUN IT:

/Users/j/MyTelegramBot/index.js:46
const account = web3.eth.accounts.privateKeyToAccount(privateKey);
^^^^^

SyntaxError: Unexpected token ‘const’
at wrapSafe (node:internal/modules/cjs/loader:1281:20)
at Module._compile (node:internal/modules/cjs/loader:1321:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
at Module.load (node:internal/modules/cjs/loader:1208:32)
at Module._load (node:internal/modules/cjs/loader:1024:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
at node:internal/main/run_main_module:28:49

THIS IS MY .ENV FILE

 TELEGRAM_BOT_TOKEN=
    INFURA_OR_ALCHEMY_ENDPOINT=
    CONTRACT_ADDRESS=
    PRIVATE_KEY=
    TELEGRAM_CHAT_ID=

——————————————————————–THIS IS THE TEST CODE THAT I USED TO TEST THE BOT.

test('basic arithmetic', () => {
  expect(1 + 2).toBe(3);
});