{"id":19388444,"url":"https://github.com/spacingbat3/disconnection","last_synced_at":"2025-04-23T23:31:39.315Z","repository":{"id":63973295,"uuid":"569392830","full_name":"SpacingBat3/DisConnection","owner":"SpacingBat3","description":"A pack of WebSocket Server and IPC to handle Discord cross-process communication.","archived":false,"fork":false,"pushed_at":"2025-01-02T23:03:24.000Z","size":661,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T22:32:47.687Z","etag":null,"topics":["arrpc","discord","discord-rpc","discord-rpc-server","ipc","rpc","rpc-server","webcord","websocket"],"latest_commit_sha":null,"homepage":"https://spacingbat3.github.io/DisConnection/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SpacingBat3.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["SpacingBat3"]}},"created_at":"2022-11-22T18:14:26.000Z","updated_at":"2025-02-01T18:59:33.000Z","dependencies_parsed_at":"2023-02-16T23:00:46.995Z","dependency_job_id":"66f32345-3d70-4c83-ad8e-740fbf32cf09","html_url":"https://github.com/SpacingBat3/DisConnection","commit_stats":{"total_commits":38,"total_committers":1,"mean_commits":38.0,"dds":0.0,"last_synced_commit":"e0fd04f1eef59f373ffc7f491f1c95f51ca0a9d1"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpacingBat3%2FDisConnection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpacingBat3%2FDisConnection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpacingBat3%2FDisConnection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpacingBat3%2FDisConnection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SpacingBat3","download_url":"https://codeload.github.com/SpacingBat3/DisConnection/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250532058,"owners_count":21446107,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arrpc","discord","discord-rpc","discord-rpc-server","ipc","rpc","rpc-server","webcord","websocket"],"created_at":"2024-11-10T10:12:42.079Z","updated_at":"2025-04-23T23:31:39.276Z","avatar_url":"https://github.com/SpacingBat3.png","language":"TypeScript","funding_links":["https://github.com/sponsors/SpacingBat3"],"categories":[],"sub_categories":[],"readme":"# DisConnection\n\nA simple Discord protocol implementation for WebSocket/IPC.\n\nIt works by wrapping a WebSocket server and introducing a class to which *hooks*\nare binded – functions executed on each message type (it might not be the same\nas message command in some cases). That means, this project's goal is to\nprovide a generic, type-safe way of implementing a Discord protocol – it however\nlacks any logic by itself, just to use the least dependencies possible.\n\n## ⚙️ Origins\n\nThis is just a result of putting parts of WebCord's code into separate project,\nin order to make it possible to be used in another software. The implementation\nitself is currently a CommonJS module, ~~however project itself will be adopted\nfor ESM projects as well~~ actually it seems to be functional without having to\ndevelop a code specifically for ESM (that's because there's no `default` module\nexport – if there will be a such I will prepare my code for ESM as well).\n\n## 📋️ Checklist\n\nMost information about the events and commands is taken from official Discord\ndocumentation. It may or may not represent the actual implementation within\nofficial RPC server / protocol. However, in my opinion, DisConnection should\nexamine these as a source of server / socket compliance with their APIs.\n\nNot all of the requests might be implemented; DisConnection currently focuses on\nthose requests which are possible to be a part of the WebCord, however I might\nconsider adding data about other requests in the future if the one used in\nWebCord will be done.\n\n### 📨️ Transports:\n  - [ ] WebSocket\n    - [X] Basic server (without `GET`/`POST` requests handling support)\n    - [ ] HTTP-based server (I might consider to implement it in the future)\n  - [ ] IPC\n\n### ⚡️ Commands:\n  - [X] `DISPATCH` (outgoing packets)\n  - [X] `DEEP_LINK` (channel only)\n  - [X] `GUILD_TEMPLATE_BROWSER`\n  - [X] `INVITE_LINK`\n  - [X] `AUTHORIZE`\n  - [X] `SET_ACTIVITY` (experimental)\n  - [ ] `GET_GUILDS`\n  - [ ] `GET_CHANNELS`\n  - [ ] `AUTHENTICATE`\n  - [ ] `SUBSCRIBE`/`UNSUBSCRIBE`\n\n### 🎆️ Events (basically *todo*):\n  - [X] `READY` (part of `DISPATCH`)\n  - [ ] `ERROR` (DisConnection uses status codes as an alternative)\n  - [ ] `GUILD_STATUS`\n  - [ ] `GUILD_CREATE`\n  - [ ] `CHANNEL_CREATE`\n  - [ ] `ACTIVITY_JOIN`\n\n## ⚔️ vs. arRPC\n\nBoth arRPC and Disconnection share one key goal: reimplement an inter-process\ncommunication of Discord using WebSocket server and unix socket or named pipe.\n\nHowever, there's still a lot of differences between both of these projects:\n\n- Unlike to DisConnection, arRPC provides example implementations of API\n  consumers, like `user.js` script or example Electron integration.\n\n- Unlike to DisConnection, arRPC implements a separate WebSocket server to\n  communicate with web browsers. This could also be done with Disconnection but\n  it's out-of-the-scope to include this within this project repo for now.\n\n- **arRPC implements both IPC and WebSocket**, Disconnection's IPC is WIP.\n\n- **Both arRPC and DisConnection are ESM**.\n\n- **arRPC also aims for Discord's process scanning implementation**. For\n  DisConnection, this is out-of-the-scope as we only consider in-scope for this\n  project to provide type-safe inter-process communication API and\n  implementation that is compatible with what Discord uses, not whole\n  *batteries included* RPC implementation.\n\n- **arRPC API is based on Node.js `EventEmitter`**. Disconnection is designed over\n  EcmaScript async design and develops a concept of *hooks* instead.\n\n- **arRPC currently lacks developer documentation**. Disconnection is\n  extensively documented with the use of JSDoc/TSDoc comments and uses TypeDoc\n  for generating online documentation from these comments.\n\n- **Disconnection is written in TypeScript**. arRPC is purely written in\n  JavaScript.\n\n  - Disconnection uses some of TypeScript language features for its advantage,\n    like enums and TypeScript's extended classes syntax (eg. abstract classes).\n\n  - arRPC currently doesn't even provide the type definition files (`.d.ts`) for\n    TypeScript API consumers and (currently) there's no DefinitelyTyped package\n    that supplies these types (`@types/arrpc`).\n\n  - TypeScript as of itself is believed to eliminate certain types of bugs in\n    code without having the compiler to yell about it (that depends on compiler\n    configuration though, as the one can always make it ignore certain issues\n    or make it to behave stricter than usual). In certain scenarios, TypeScript\n    can even predict what's going to happen in code at given point. Of course,\n    using TypeScript doesn't make any software *bulletproof* and JavaScript by\n    itself isn't considered to be *unsafe*, you can still write software in\n    TypeScript that breaks at runtime.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacingbat3%2Fdisconnection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspacingbat3%2Fdisconnection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacingbat3%2Fdisconnection/lists"}