alice.The music bot
field guide
Make it yours

The little settings.

Your credentials, your group, your listening limits. Alice reads them from Config.env.

Required credentials

The filename is case-sensitive. Start with the supplied Config.env.example; setup creates a copy automatically when Config.env doesn’t exist.

Config.env · replace every placeholder
API_ID=your_numeric_api_id
API_HASH=your_api_hash
BOT_TOKEN=your_bot_token
STRING_SESSION=your_assistant_session
MONGO_URL=your_mongodb_uri
OWNER_ID=your_numeric_telegram_id

All settings

VariableDefault / requirementPurpose
API_IDRequiredTelegram application ID; a number.
API_HASHRequiredTelegram application hash from my.telegram.org.
BOT_TOKENRequiredToken created by BotFather.
STRING_SESSIONRequiredPyrogram/Pyrofork-compatible assistant user session.
MONGO_URLRequiredMongoDB connection URI, including the application credentials.
OWNER_IDSet your user IDYour numeric Telegram user ID. Grants owner access.
LOG_GROUP_ID0Log chat ID for startup notices. Zero skips notices.
UPDATE_REPOhttps://github.com/thanosbots/Alice.gitRepository used by the owner-only update checker.
UPDATE_BRANCHRepository defaultOptional release branch to check.
MUSIC_QUALITY320Preferred source bitrate: 96, 160 or 320 kbps, depending on source availability.
MAX_DOWNLOAD_MB40Maximum downloaded audio size in MB; minimum 1.
MAX_TRACK_MINUTES30Maximum track duration in minutes; minimum 1.
MAX_QUEUE_SIZE50Maximum queued tracks, including the current song; minimum 1.

Connect MongoDB

Create a MongoDB database and a dedicated application user. Allow connections from your bot host, copy the connection URI, replace its credential placeholders, and paste it into MONGO_URL. URL-encode special characters in the username or password when required by your connection provider.

Alice uses MongoDB for user/group records and play counts. Check authentication and network access if statistics cannot be saved.

Apply your changes

Save the file and restart the existing bot process. Attach to your tmux session, stop Alice with Ctrl + C, and run:

Terminal
bash start.sh
KEEP GOINGSet up your assistant
Search the field guide · ↓ to select · Enter to open · Esc to close