Skip to content

Bots and Applications

Spacebar is backwards-compatibile with, and so all existing bots and applications designed for should work relatively easily when connected to a Spacebar instance instead.

The Discord Developer Panel is available at /developers, and allows you all the same functionality to create bots and applications on a Spacebar instance as

Bot Libraries


The Client class constructor accepts a http object, which you can use to change the endpoints used.

const { Client } = require("discord.js");

const client = new Client({
    http: {
        version: 9,
        api: "",
        cdn: "",
        invite: "",

client.login("your token here");

import discord

discord.http.Route.BASE = ""
client = discord.Client()'your token here')


  1. Create a RestConfig instance: RestConfig restConfig = new RestConfig();
  2. Use RestConfig#setBaseUrl to tell JDA what your Rest URI is (this NEEDS to include /api/, because it's the api base url for all requests): restConfig.setBaseUrl("https://{REPLACE HERE WITH YOUR API SERVER URL}/api/v9");
  3. Create another class, and extend ConcurrentSessionController, e.g. public class SpacebarSessionController extends ConcurrentSessionController
  4. Override the ConcurrentSessionController#getGateway method:
        public String getGateway() {
            return "wss://{REPLACE HERE WITH YOUR GATEWAY SERVER URL}/?encoding=json&v=9&compress=zlib-stream";
  5. Finally, configure JDA to use your RestConfig & SpacebarSessionController, like this:
    JDA jda = JDABuilder.createDefault("not_a_real_token_lol")
                    .setSessionController(new SpacebarSessionController())