Having trouble hosting a telegrambot in js to Render

I am trying to host my telegram bot on Render. I am kinda new to programming so I apologize for any stupid code.

Im using VScode as editor and integrated terminal
When i host the bot locally with npm run dev through nodemon, everything works fine, but on Render I am treated with :

error code

/opt/render/project/src/node_modules/node-fetch/lib/index.js:1501
reject(new FetchError(request to ${request.url} failed, reason: ${err.message}, ‘system’, err));
^
FetchError: request to https://api.telegram.org/bot7086599593:[REDACTED]/setMyCommands failed, reason:
at ClientRequest. (/opt/render/project/src/node_modules/node-fetch/lib/index.js:1501:11)
at ClientRequest.emit (node:events:518:28)
at TLSSocket.socketErrorListener (node:_http_client:500:9)
at TLSSocket.emit (node:events:518:28)
at emitErrorNT (node:internal/streams/destroy:169:8)
at emitErrorCloseNT (node:internal/streams/destroy:128:3)
at processTicksAndRejections (node:internal/process/task_queues:82:21)
at runNextTicks (node:internal/process/task_queues:64:3)
at listOnTimeout (node:internal/timers:540:9)
at process.processTimers (node:internal/timers:514:7) {
type: ‘system’,
errno: ‘ETIMEDOUT’,
code: ‘ETIMEDOUT’
}


I am new to all of the coding world, so I am not sure what I should attach, so here is my index.js and package.json

index.js

const { Telegraf, Extra  } = require('telegraf');
const bot = new Telegraf('<My token>');
const { timeOptions, levOption } = require('./options.js');
const { DateTime } = require('luxon');
const { translate } = require('google-translate-api-browser');
const keep_alive = require('./keep_alive.js')











// get time
function getCurrentTime(timezone) {
    return DateTime.now().setZone(timezone).toLocaleString(DateTime.TIME_24_SIMPLE);
}
const russiaTime = getCurrentTime('Europe/Moscow');
const indonesiaTime = getCurrentTime('Asia/Singapore');

// make words
let generate;
import('random-words').then(module => {
    generate = module.generate;
});




//commands 



bot.telegram.setMyCommands([
            { command: 'start', description: 'say hello' },
            { command: 'time', description: 'get times' },
            { command: 'lev', description: 'lev command' },
        ]);






//start
bot.start(ctx => {
    ctx.reply(`some text`);
    ctx.replyWithSticker('CAACAgIAAxkBAAEE4eNmJSOk67FOoiMUqzY-WHOh_2Pm8QACFQADwzrpMIiABX8lwyAmNAQ');
    });



// lev options
bot.command('lev', (ctx) => {
    ctx.reply('some text', levOption)
    });

// lev reply
bot.action('levText', (ctx) => {
    let randomAmount = Math.floor(Math.random() * 5) + 1 ;
    let randomSentence = generate({ exactly: randomAmount, join: " " });
    translate(`${randomSentence}`, { to: "ru" })
  .then(res => {
    ctx.reply(`some text, n${res.text}`);
  })
    });

//time options
bot.command('time', ctx => {
    ctx.reply(`some text?`, timeOptions)
    });
   
    //time reply
bot.action("israel", ctx => {
    ctx.reply(`some text, ${russiaTime}`);
    });
bot.action("indonesia", ctx => {
    ctx.reply(`some text, ${indonesiaTime}`);
    });
bot.action("russia", ctx => {
    ctx.reply(`some text, ${russiaTime}`);
    });
bot.action("allcountries", ctx => {
    ctx.reply(`some text, ${russiaTime},nа some text ${indonesiaTime}`);
    });
   
    
    
    













bot.launch();

package.json


{
  "name": "tgbot",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "dependencies": {
    "google-translate-api-browser": "^5.0.0",
    "luxon": "^3.4.4",
    "node-fetch": "^2.6.1",
    "random-words": "^2.0.1",
    "telegraf": "^4.16.3"
  },
  "devDependencies": {
    "nodemon": "^3.1.0"
  },
  "scripts": {
    "test": "echo "Error: no test specified" && exit 1",
    "dev": "nodemon index.js"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/SDX24/ovr-bot.git"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "bugs": {
    "url": "https://github.com/SDX24/ovr-bot/issues"
  },
  "homepage": "https://github.com/SDX24/ovr-bot#readme",
  "engines": {
    "node": "20.12.2"
  }
}



FYI: I the repository I am using is private, as there are my telegram bot tokens and I have removed some unnessesary comments and texts as they are written in a different language and shouldnt be affecting anything.
Thank you in advance!

I have tried to change versions of node-fetch and node as well as telegraf, tried implementing chatGPT written error catching and retry logic but am still getting the same issue.

I assume that the issue maybe related to me using telegraf as it has been one of the error parts when i tested previous code versions, but I think I fixed it.

New contributor

Lhp is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật