How would I make a discord bot that logs shifts?

this is my first post here so I apologize if this is messy. Anyways lets get to the point. I am trying to make a discord bot in JS that can log shifts. I want to make it where if you type in /startshift or something similar to it, then the bot will send something like Your shift has started at [The time you used the command]. Then when you are over with your shift you can go back and type /endshift and it will say something along the lines of You have just ended your shift. You were on duty for [The amount of time you were on duty] and then store that time preferably on MongoDB but really anything works. Although I don’t have an idea of how to go about doing this. I am fairly new to discord bot development. I am sure that you would say that if you are starting off you shouldn’t start with something this complicated but I am fairly adamant about creating this.

I’ve searched threw google for something similar that I could follow along with, unfortunately I didn’t find anything. I even tried to whip something up with my limited JS knowledge, which obviously didn’t work either.

To sum it up, I just need to know where to start and what to search up on google to learn what I need to in order to accomplish this. Thank you for viewing this, have an amazing night/day!