screeps-api
    Preparing search index...

    Interface UserConsoleEventData

    Payload of a UserConsoleEvent

    // After calling `api.userConsole('Game.time')` on an unofficial server:
    {
    messages: {
    log: [],
    results: ["16746996"]
    }
    }
    // After bot emits logs on shard2 of an official server:
    {
    messages: {
    log: [
    "I: Hello, world!",
    "E: Oh noes, an error occurred!"
    ],
    results: []
    }
    shard: "shard2"
    }
    interface UserConsoleEventData {
        error?: string;
        messages?: UserConsoleMessages;
        shard?: string;
    }
    Index

    Properties

    error?: string

    Console messages/results from the previous tick. Undefined if no output was produced.

    shard?: string

    The shard name (undefined on unofficial servers)