Telegram bot for tracking your dog activity in a very simple way
Storage - sqlite
- Use golang 1.22
- Create a new bot with BotFather
- Save token as a temporary env for start. Copy paste next command:
read -s TELEGRAM_TOKEN
-
Copy the bot's token into the input field of the previous command once and press enter (pasted token will be invisible)
-
install sqlc for generating code from sql. For macos brew users just copy paste next command:
brew install sqlc
- Run migrations and start the bot with air help. Just copy paste next command:
TELEGRAM_TOKEN=$TELEGRAM_TOKEN go run github.com/cosmtrek/air@latest
-
Go to your bot and type /start
-
check your base with sqlite3
sqlite3 -readonly database.sqlite3
- deploy it whereever you want