DiscordBotClient icon indicating copy to clipboard operation
DiscordBotClient copied to clipboard

usage with discord server reimplementations

Open AnotherCrab1 opened this issue 1 month ago • 3 comments

I would want to use this client with spacebar.chat (the official client connects to it and almost everything works) would this be possible? Either a custom host option or changing all the urls to spacebar's

AnotherCrab1 avatar Nov 04 '25 10:11 AnotherCrab1

I haven’t tried it yet, but I hope it’ll work fine

aiko-chan-ai avatar Nov 04 '25 16:11 aiko-chan-ai

so does it work? if you didnt test it can you give me a list of all the discord urls or where a custom host option is located

AnotherCrab1 avatar Nov 15 '25 12:11 AnotherCrab1

In simple terms, this application consists of the following:

https://github.com/aiko-chan-ai/DiscordBotClient/blob/0a70c07866577eee53540b978f12f9f380ecd257/src/AppCore/APIServer.ts#L29-L33 https://github.com/aiko-chan-ai/DiscordBotClient/blob/0a70c07866577eee53540b978f12f9f380ecd257/src/AppCore/APIServer.ts#L93-L96

  1. Creating a lightweight proxy server (Express) on localhost to handle MITM processing for requests sent to the Discord API (handling errors, exceptions, adding valid data, preventing spam to restricted APIs), including serving an HTML snapshot of the Discord website to avoid conflicts with Vencord.

https://github.com/aiko-chan-ai/DiscordBotClient/blob/0a70c07866577eee53540b978f12f9f380ecd257/src/AppCore/index.ts#L168

  1. Using Electron’s host-rules switch to rewrite all discord.com URLs to localhost

  2. Using Vencord to patch code sections that are not intended for bots.

Therefore, if you need to change the URL, depending on the type of server you are using, you may need to modify parts of the code including the proxy section, the domain used in Electron, and the Vencord manifest

aiko-chan-ai avatar Nov 15 '25 16:11 aiko-chan-ai