The app is configured via environment variables listed in this file. Here is a minimal example .env
file:
AHM_HOST=169.42.0.1
BOT_TOKEN=<your_telegram_bot_token>
ADMIN_USERS=<some_user_id>,<some_other_user_id>,...
PLAYER_COMMAND="ffplay -nodisp -autoexit %f"
- install SoX for playing audios:
winget install --id=ChrisBagwell.SoX -e
- get the full name of the speaker (i. e. from Windows Device Manager)
- use it like this:
PLAYER_COMMAND='"C:\Program Files (x86)\sox-14-4-2\sox.exe" -q %f -t waveaudio "High Definition Audio Device"'
cargo build --release
, saves an executable into thetarget/release
dir- run the executable having the
.env
in the working dir
- Set
DATABASE_URL=sqlite://data/bot.db
variable in a.env
file. cargo install sqlx-cli
mkdir data
sqlx database create
sqlx database setup
- When editing SQL queries, don't forget to run
sqlx database prepare
before commiting changes! - More information here