Skip to content

Revenge Next Architecture & Overview

Revenge Next is an advanced client modification framework for modern Android Discord. Built from the ground up to operate on modern Discord builds, it runs as an Xposed module within the Discord process, hosting a custom Hermes JavaScript engine running Hermes Bytecode v96.


Execution Layers

Revenge Next divides plugin responsibilities between two execution environments:

  • Native Android (DEX): Pre-compiled Kotlin/Java bytecode loaded by DexClassLoader into Discord\'s ClassLoader before JavaScript initializes. Operates low-level view layout, OpenGL canvas rendering, hardware sensors, and Xposed method hooks.
  • Hermes JavaScript: TypeScript sources bundled by @revenge-mod/plugin-cli evaluated in Hermes Bytecode v96. Manages React Native UI components, settings sheets, Flux store subscriptions, and chat row modifications.

The Bi-directional RPC Bridge

Kotlin native code and Hermes JavaScript communicate synchronously and asynchronously across the bridge: * Kotlin: registerMethod("${manifest.id}.methodName") { args -> ... } * JavaScript: callNativeMethod("plugin.id.methodName", [args]) or callNativeMethodSync(...)


Lifecycle Architecture

Plugins transition through four formal lifecycle phases: - preInit: Native JARs load into the ClassLoader. External plugins evaluate in Hermes JS before Metro modules load. Never access UI or Flux proxies at module scope. - init: Core framework bindings and settings stores are initialized. - start(api): Plugin entrypoint fires. Modules and stores resolve lazily. All hooks and listeners are registered via api.cleanup(...). - stop() / api.cleanup(): Every patch, interval, and listener is dismantled deterministically.


Revenge Next Documentation Directory