diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..c352c3a --- /dev/null +++ b/README.md @@ -0,0 +1,59 @@ +# Spotify Discord Profile Widget Bot + +A Discord bot that connects Spotify accounts to update Discord Profile Identity widgets with real-time listening statistics (Top Songs, Top Artists, Top Albums, and Recently Liked tracks). + +--- + + +## Setup Guide + +### 1. Install Dependencies + +This project uses **uv** for fast dependency management. + +Install the required packages into your virtual environment: + +```bash +uv pip install discord.py spotipy aiohttp python-dotenv + +``` + +*(If you are managing the project using a `pyproject.toml` file, you can run `uv sync` instead.)* + +### 2. Environment Configuration + +Create a `.env` file in the root directory and add your API credentials: + +```env +SPOTIFY_CLIENT_ID=your_spotify_client_id +SPOTIFY_CLIENT_SECRET=your_spotify_client_secret +SPOTIFY_REDIRECT_URI=http://localhost:8888/callback + +DISCORD_BOT_TOKEN=your_discord_bot_token +DISCORD_APP_ID=your_discord_application_id + +``` + +> **Note:** Ensure `http://localhost:8888/callback` is listed under the Redirect URIs in your Spotify Developer Dashboard settings. + +--- + +## Running the Bot + +Run the bot script directly using `uv`: + +```bash +uv run main.py + +``` + +--- + +## Bot Commands + +| Command | Description | +| --- | --- | +| `/spotify_login` | Generates a Spotify authorization link to start account linking. | +| `/submit_code` | Submits the OAuth code or callback URL to finish linking your account. | +| `/range` | Sets the preferred timeframe for statistics (e.g. `7d`, `4w`, `6m`, `1y`). | +| `/update_widget` | Forces an immediate refresh of your Discord profile widget payload. |
\ No newline at end of file |
