
My love for programming always pushes me to learn a lot, but my love for JavaScript pushes me to develop myself and those around me
The idea of this project is really simple, All of us know the time t parameter in the link URL of YouTube if you put this parameter with any of h, m or s entities the video link takes you to the time you mentioned.
If I want to go to the third minute and the 12th second I could say 3m12s and put it the t parameter in the URL t=3m12s
The general public does not know the parameters, the URLs and these nonsense, So I decided to take this journey and make a bot of Telegram that makes it for the people in simple command /retiming with this pattern: /retiming {the yt link} {the time}, So if you want to send a video to your friend and directly hit 01:25 you can send to the bot like this /retiming https://www.youtube.com/abcd 1m25s
The previous command will take the link you sent and send back a new link that direct the user to this time you mentioned
The Bot checks all possibilities and is fully aware of all possible errors and how to handle them and send the appropriate response. It is also able to differentiate between all sent URLs and can identify whether the address actually has a param or not
Learning outcomes here prove to you how much I have learned things and how I can learn anything and raise my level in Node js
telegraf.jsnode.jsDon't forget the best
The BotFather✨