Live Preview: @justanotherdogchannel on Telegram.
Important
You will only need all of them if you are not running it dockerized. Read "Deploying with Docker" for more information.
- Node.js or Bun (latest is suggested)
- A Telegram bot (create one at @BotFather)
- Docker and Docker Compose (only required for Docker setup)
First, clone the repo with Git:
git clone https://github.com/ABOCN/AnimalPicBotNext, inside the repository directory, create an .env file with some content, which you can see the example .env file to fill info with. To see the meaning of each one, see the Functions section.
After editing the file, save all changes and run the bot with bun start.
Tip
To deal with dependencies, just run bun install or bun i at any moment to install all of them.
Important
Please complete the above steps to prepare your local copy for building.
Note
Using the -d flag when running causes the bot to run in the background. If you're just playing around or testing, you may not want to use this flag.
You can also run AnimalPicBot using Docker, which simplifies the setup process. Make sure you have Docker and Docker Compose installed.
-
Make sure to setup your
.envfile first! -
Run the container
docker compose up -d
If you prefer to use Docker directly, you can use these instructions instead.
-
Make sure to setup your
.envfile first! -
Build the image
docker build -t animalpicbot . -
Run the container
docker run -d --name animalpicbot --restart unless-stopped -v $(pwd)/.env:/usr/src/app/.env:ro animalpicbot
Important
Take care of your .env file, as it is so much important and needs to be secret (like your passwords), as anyone can do whatever they want to the bot with this token!
- botToken: Put your bot token that you created at @BotFather.
- cronSchedule: Schedule for sending images (default: every day at midnight)
- channelId: Channel ID to send images to
- ownerId: Your Telegram user ID
- animalType: Set animal to send
- maxRetries: Maximum number of retries after a crash
Made with contrib.rocks.
BSD-3-Clause - 2024 ABOCN Contributors.