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/releasedir- run the executable having the
.envin the working dir
- Set
DATABASE_URL=sqlite://data/bot.dbvariable in a.envfile. cargo install sqlx-climkdir datasqlx database createsqlx database setup- When editing SQL queries, don't forget to run
sqlx database preparebefore commiting changes! - More information here