A GitHub Actions-based Steam stats fetcher that automatically updates a Discord application profile widget.
Runs daily or manually via workflow dispatch.
This repository includes a pre-configured widget layout file: widget-layout.json
This file is used only for importing the widget layout into Discord. It is not required for the Node.js script to run.
-
Open the Discord Previews server thread:
-
Locate the widget import tool provided in the thread (Discord Widget Extension).
-
Open the widget import window.
-
Open the file in this repository: widget-layout.json
-
Copy the entire contents of the file.
-
Paste it into the widget import window.
-
Click Import.
Important
- This file only defines the layout and data bindings.
- It does NOT contain your Steam or Discord credentials.
- The Node.js script is responsible for providing live data to this widget.
- If the widget layout is updated in the future, re-importing may be required.
Click the Fork button on GitHub (top right).
Then clone your fork (optional):
git clone https://github.com/YOUR_USERNAME/SteamWidgetUpdater.git
cd SteamWidgetUpdaterGo to:
Settings → Secrets and variables → Actions → New repository secret
Add the following:
| Secret | Description |
|---|---|
| STEAM_API_KEY | Steam Web API key |
| STEAM_ID | Your SteamID64 |
| BOT_TOKEN | Discord bot token |
| APPLICATION_ID | Discord application ID |
| DISCORD_USER_ID | Your Discord user ID |
Important
- Do not use quotes
- Do not use
{}placeholders - Paste raw values only
Go to:
Actions → Enable workflows
Approve if prompted.
Go to:
Actions → Update Steam Widget → Run workflow
Runs every 1 day (UTC):
0 0 */1 * *Each run:
-
Fetches Steam profile data
-
Calculates:
- Total playtime
- Recent 2-week playtime
- Most played game
- Steam level
- Friends count
- Badge count
- Profile age
-
Builds widget payload
-
Sends PATCH request to Discord API
-
Updates your profile widget
- Steam profile must be accessible via Steam Web API (Meaning public Friends List and etc.)
- Valid Steam Web API key (Get one here!)
- Discord application with widget support
- GitHub Actions enabled
GitHub Secrets were not configured correctly.
Invalid Steam API key or Steam ID.
Incorrect APPLICATION_ID or DISCORD_USER_ID.
- Must be on default branch
- GitHub cron may have delays
Warning
- Never hardcode secrets in code
- Never commit .env files
- Always use GitHub Secrets

