A Discord bot that watches over your artwork on WPlace. It polls the canvas, compares it to your project images, and tells you how your art is doing: completion percentage, progress, and who's griefing you.
Multiple people in your server can track their own projects at the same time.
You'll need a computer (or server) that can stay online while the bot runs. A cheap Linux VPS, a Raspberry Pi, or just your desktop works fine.
uv is a fast Python package manager. Install it by following the instructions on the uv installation page.
Open a terminal and run:
uv tool install git+https://github.com/Liz4v/pixel-hawk.gitThis installs the hawk command on your system. You can update later with:
uv tool upgrade pixel-hawk- Go to the Discord Developer Portal
- Click New Application, give it a name (like "Pixel Hawk"), and create it
- Give it a pretty profile picture, too 🖼️🎨🖌️😊
- Go to the Bot tab on the left
- Click Reset Token, then Copy; save this token somewhere safe, you'll need it in a moment
- Still in the Developer Portal, go to the OAuth2 tab
- Under OAuth2 URL Generator, check the bot scope
- Under Bot Permissions, check:
- Send Messages
- Use Slash Commands
- Copy the generated URL at the bottom and open it in your browser
- Select your server and authorize the bot
Create a folder where Pixel Hawk will store its data, and add a .env file with your bot token:
mkdir pixel-hawk && cd pixel-hawk
echo "HAWK_BOT_TOKEN=paste-your-token-here" > .envThen start the bot:
uv run hawkThat's it! Pixel Hawk will initialize its database, connect to Discord, and start syncing its slash commands. Give it a few seconds to appear online in your server.
In your Discord server, type:
/hawkadmin admin user:@yourself
Pick your own name from the user selector. This only works for the first admin; it makes you the first (and for now, only) admin.
Choose which role in your server gives people access to the bot:
/hawkadmin role name:Artist
Replace Artist with whatever role you want. Anyone with that role can now use /hawk commands. People without the role won't see anything. You can change this anytime.
- Make your art as a PNG image using the WPlace palette
- Run
/hawk newand upload the image; give it a name and the WPlace coordinates where it should go - Pixel Hawk starts polling the canvas and tracking your art
Run /hawk watch and pick your project. Pixel Hawk posts a message in the channel that auto-updates every time it detects changes, showing completion percentage, pixel counts, progress rate, ETA, and 24-hour activity.
User commands (/hawk):
| Command | What it does |
|---|---|
/hawk new |
Upload a new project image to track |
/hawk edit |
Change a project's name, coordinates, state, or image |
/hawk delete |
Permanently delete a project |
/hawk list |
See all your projects with stats (only visible to you) |
/hawk watch |
Post a live-updating status message for a project |
/hawk unwatch |
Stop watching a project in this channel |
All user commands also work in DMs, as long as you've used the bot in a server at least once before.
Admin commands (/hawkadmin, server only):
| Command | What it does |
|---|---|
/hawkadmin admin |
Grant bot admin to a user |
/hawkadmin role |
Set the required role for this server |
/hawkadmin quota |
View or set per-user project/tile limits |
/hawkadmin guildquota |
View or set server-wide quota ceilings |
- Live progress tracking: watches your art on the canvas and reports completion percentage, pixel-by-pixel
- Auto-updating Discord messages:
/hawk watchposts a message that refreshes with current stats every polling cycle - Grief detection: spots when someone paints over your art and tells you who did it
- Multi-user support: everyone in the server can track their own projects independently
- Smart polling: prioritizes tiles that change often, so active areas get checked more frequently
- Per-user and per-server quotas: admins control how many projects and tiles each person (and the whole server) can track
- Project states: set projects to active, passive (piggybacks on other polls), or inactive to manage resource usage
- DM support: use commands in DMs after your first interaction in a server
| Setting | Default | How to set it |
|---|---|---|
| Bot token | (required) | HAWK_BOT_TOKEN in .env |
| Command prefix | hawk |
HAWK_COMMAND_PREFIX in .env |
| Data directory | ./nest |
HAWK_NEST in .env, or hawk --nest /path |
For a server that stays online without a terminal open:
git clone https://github.com/Liz4v/pixel-hawk.git ~/pixel-hawk
cd ~/pixel-hawk
bash scripts/install-service.sh
sudo nano /etc/pixel-hawk.env # set HAWK_BOT_TOKEN here
sudo systemctl restart pixel-hawkgit clone https://github.com/Liz4v/pixel-hawk.git
cd pixel-hawk
uv sync
uv run hawkLinting, type checking, and tests:
uv run ruff check
uv run ty check
uv run pytest