- Open a session with BotFather
- Type
/newbot
- Enter display name of the bot
- Enter username for the bot (must end with
bot
) - Don't forget to save the token!
- Open a session with BotFather
- Type
/setjoingroups
- Enter the name of the bot.
@example_bot
- Enter
Disable
- Open a session with BotFather
- Type
/setprivacy
- Enter the name of the bot.
@example_bot
- Enter
Disable
All configuration must be set as environment variables
In development (default), it will look for a .env
file next to the binary/entrypoint ./cmd/parser.go
.
Configuration Key | Type | Default | Description |
---|---|---|---|
ENV | string |
development |
|
PORT | int |
3000 |
Webhook Server port to listen on |
TG_BOT_TOKEN | string |
(REQUIRED) Telegram Bot Token | |
TG_WEBHOOK_URL | string |
(REQUIRED) Webhook server URL for your bot to send updates to | |
ALLOWED_PRIVATE_USERS | []string |
[] |
List of users (comma-separated) to allow handling messages from private chat with bot. Example: user_a,user_b |
DB_HOST | string |
localhost |
|
DB_PORT | int |
5432 |
|
DB_USERNAME | string |
postgres |
|
DB_PASSWORD | string |
postgrespassword |
|
DB_DATABASE | string |
postgres |
|
DB_UNIX_SOCKET | string |
`` | Used to connect to GCP Cloud SQL using Unix Socket |
Example message:
200
shopping
cash
Required data:
ON SEPARATE LINES! In any order
- Amount (float64)
- Category
- Payment Method