Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord HypeSquad Switcher

A small command-line tool for joining, switching, or leaving your Discord HypeSquad house (Bravery, Brilliance, or Balance) directly through Discord's API.

Features

  • Join the Bravery, Brilliance, or Balance house
  • Leave your current house and remove the badge entirely
  • Optional non-interactive mode via a DISCORD_TOKEN environment variable
  • Strict TypeScript types for houses, requests, and errors
  • Clear separation between API client, business logic, and CLI layers

Prerequisites

  • Node.js 18 or later
  • npm

Installation

git clone https://github.com/tadakai/discord-hypesquad-switcher.git
cd discord-hypesquad-switcher
npm install

Usage

Interactive mode

npm run dev

You will be prompted for your Discord token, then asked to pick a house.

Production build

npm run build
npm start

Non-interactive mode

Copy .env.example to .env and set your token to skip the token prompt:

cp .env.example .env
DISCORD_TOKEN=your-token-here

How to find your Discord token (using Console)

  1. Open Discord in your browser and log in.

  2. Open Developer Tools and go to the Console tab:

    • Press Ctrl+Shift+J (Windows/Linux) or Cmd+Option+J (Mac).
    • Alternatively, press F12 and click the Console tab.
  3. Paste the following command into the console and press Enter:

    window.webpackChunkdiscord_app.push([[Symbol()],{},r=>{for(let m of Object.values(r.c))try{if(!m.exports||m.exports===window)continue;m.exports.getToken&&(token=m.exports.getToken());for(let p in m.exports){let x=m.exports[p];x&&x.getToken&&"IntlMessagesProxy"!==x[Symbol.toStringTag]&&(token=x.getToken())}}catch(e){}}]),window.webpackChunkdiscord_app.pop(),token;

How it works

Discord exposes a single REST resource for HypeSquad membership:

Action Method Endpoint Body
Join a house POST /api/v9/hypesquad/online { "house_id": 1 | 2 | 3 }
Leave your house DELETE /api/v9/hypesquad/online none

A successful call returns an empty 204 No Content response. Any other status is treated as an error and surfaced with Discord's own error message where available.

License

Distributed under the MIT License. See LICENSE for details.

Releases

Packages

Contributors

Languages