Bots and Applications
Spacebar is backwards-compatibile with Discord.com, and so all existing bots and applications designed for Discord.com 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 Discord.com.
Bot Libraries
Discord.js
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: "https://api.spacebar.chat",
cdn: "https://cdn.spacebar.chat",
invite: "https://spacebar.chat/invite",
},
});
client.login("your token here");
Discord.py
import discord
discord.http.Route.BASE = "https://api.spacebar.chat"
client = discord.Client()
client.run('your token here')
JDA
import java.lang.reflect.*;
import net.dv8tion.jda.internal.requests.*;
public static void main(String[] args) {
JDA jda = JDABuilder.createDefault("your token here").build();
Field field = Requester.class.getDeclaredField("DISCORD_API_PREFIX")
field.setAccessible(true);
Field modifiers = Field.class.getDeclaredField("modifiers");
modifiers.setAccessible(true);
modifiers.setString(field, field.getModifiers() & ~Modifier.FINAL);
field.set(null, "https://api.spacebar.chat");
}