assassin-bug/src/engine/commands/echo.js

8 lines
287 B
JavaScript

export default function EchoCommand(args, context) {
if (args[1] != "on" && args[1] != "off") {
context.print(`Usage: echo <on/off>`);
} else {
context.setInputEcho(args[1] == "on" ? true : false);
context.print(`Command echo is now ${args[1]}.`);
}
}