diff options
| author | alex <[email protected]> | 2026-07-22 20:13:45 +0200 |
|---|---|---|
| committer | alex <[email protected]> | 2026-07-22 20:13:45 +0200 |
| commit | a5e3fc40eecc103ad07b9571e3a6d5e390f3cc44 (patch) | |
| tree | 51c9716507a0c5f2500cb10f68e4ff121391e531 | |
| parent | 96a79ca5e28c37b8c34efa37307e99500e6302d0 (diff) | |
| download | spotify-discord-widget-main.tar.xz spotify-discord-widget-main.zip | |
| -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 |
