import { command_processor } from "https://esm.town/v/curtcox/command_processor?v=14";
function tail(text: string): string {
const trimmed = text.trimStart();
const index = trimmed.indexOf(" ");
if (index !== -1) {
return trimmed.substring(index + 1);
} else {
return "";
}
}
export const processor = async (body) => {
console.log("command processor " + body);
const command = tail(body.event.text);
return command_processor(command);
};