Timestamp Converter Bot is a Telegram bot that converts timestamps to human-readable dates and vice versa. It is built using the Telegraf library for Node.js.
- Convert Unix timestamps to various date formats.
- Convert human-readable dates to Unix timestamps.
- Commands to get the current time and convert timestamps or dates.
- Node.js
- npm (Node Package Manager)
- Docker (optional, for containerized deployment)
-
Clone the repository:
git clone https://github.com/maxktz/timestamp-converter-bot.git cd Timestamp-Converter-Bot
-
Install dependencies:
npm install
-
Create a
.env
file based on the.env.example
:cp .env.example .env
-
Add your Telegram bot token to the
.env
file:TELEGRAM_BOT_TOKEN=your_telegram_bot_token
To start the bot locally, run:
npm start
Build and start the Docker container:
docker-compose up -d
The bot will be running inside the Docker container.
/start
- Get instructions on how to use the bot.
/now
- Get the current time.
/ts <timestamp>
- Convert a Unix timestamp to various date formats.
/date <date>
- Convert a human-readable date to a Unix timestamp.
This project is licensed under the MIT License.