Kill Feed

This guide will demonstrate how to use RCE.JS to create a kill feed in your server!

Example

import { RCEManager, RCEEvent, LogLevel, RCEIntent, type PlayerKillEventPayload } from "rce.js";

const rce = new RCEManager();
await rce.init({
    email: "",
    password: ""
}, {
    level: LogLevel.Info
});

await rce.servers.add({
    identifier: "my-solo-duo-trio-3x",
    serverId: 1234567,
    region: "US",
    intents: [RCEIntent.All]
});

rce.on(RCEEvent.PlayerKill, async (payload: PlayerKillEventPayload) => {
    await rce.servers.command(
        payload.server.identifier,
        `say <color=red>${payload.killer.name}</color> killed <color=red>${payload.victim.name}</color>`
    );
});

Last updated