first, make sure you have a firebase account. Else create one
create a new project from your firebase account.
install firebase cli with npm i firebase-tools -g in your terminal
make a new directory with mkdir <new_project>
change the directory with cd <new_project>
add the commandy to your new projeect directory firebase init
follow the instruction. make sure you set your project to default. choose any language of your choice either JavaScript or TypeScript.
navigate to your repo
open the browser with firebase serve. create a new bot with botfather from your web.telegram.org.
rename the bot and you got to https://telegraf.js.org/ and install telegrap to your project directory inside the function folder with npm i telegrap --save get your api key. make it private to you