8000 GitHub - anon5r/bsky-handle-checker: Check if a specific domain is recorded as a custom handle in Bluesky
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

anon5r/bsky-handle-checker

Repository files navigation

Bluesky Handle Checker

日本語版はこちら

Overview

This tool is an application that checks for the existence of handles for specific domains on Bluesky. It can be managed via Discord, and results are notified to Discord channels. SQLite is used for data persistence.

Click here for how to use the Bot

Requirements

  • Node.js (v23 or higher)
  • pnpm
  • Docker (if using Docker)
  • .env file configuration
  • Creation of ./data/ directory

Environment Setup

1. Setting Environment Variables

  1. Copy .env.example to .env
  2. Set the necessary values in the .env file

2. Creating Data Directory

mkdir ./data

3. Discord Bot Setup

  1. Create a new application on the Discord Developer Portal
  2. Set the following items in the .env file:
DISCORD_TOKEN=Your bot token
DISCORD_CLIENT_ID=Application client ID
  1. Bot scopes:
    • bot
    • applications.commands
  2. Required bot permissions: 18432
    • Send Messages
    • Embed Links When inviting the bot to a server, please grant the above permissions. Without these permissions, the bot may not function properly.

Installation and Execution Methods

Running in Node.js Environment

  1. Install packages
pnpm install
  1. Build
pnpm build
  1. Initialize DB
pnpm migrate
  1. Execution methods
  • Start Discord bot:
pnpm bot
  • Run crawler:
pnpm crawl
  • Notify crawl results:
pnpm notify
  • Run crawler and result notification simultaneously:
pnpm start

Running in Docker Environment

Building and Running in Local Environment

  1. Build image
docker compose build
  1. Initialize DB
docker compose run --rm -it app migrate
  1. Start Discord bot
docker compose up -d bot
  1. Run crawler
docker compose up crawler
  1. Notify crawl results
docker compose up notifier

Running as Individual Containers

  1. Create builder
docker buildx create --name mybuilder --use
  1. Build image
docker buildx build --platform linux/amd64,linux/arm64 -t <your-docker-registory>:latest -f Dockerfile --push .
  1. Initialize DB
docker run --env-file .env -v ./data:/app/data --name bsky-checker ghcr.io/anon5r/bsky-handle-checker:latest migrate
  1. Start Discord bot
docker run -d --env-file .env -v ./data:/app/data --name bsky-check-bot ghcr.io/anon5r/bsky-handle-checker:latest bot
  1. Run crawler
docker run --env-file .env -v ./data:/app/data --name bsky-checker ghcr.io/anon5r/bsky-handle-checker:latest crawl
  1. Notify crawl results
docker run --env-file .env -v ./data:/app/data --name bsky-checker ghcr.io/anon5r/bsky-handle-checker:latest notify

How It Works

Checks whether a handle DID can be referenced from a domain name.

Note

It does not verify whether the domain is actually set as a handle for an account.

Technology Stack

  • Node.js 23.x
  • TypeScript 5.7.x
  • Discord.js 14.x
  • SQLite 3.42
  • Other major packages:
    • dotenv
    • axios
    • umzug
    • better-sqlite3

This application can be run directly in a Node.js environment or in a Docker environment, depending on your environment and needs. Follow the setup to execution steps to prepare the necessary environment.

0