This commit is contained in:
MTRNord
2023-10-20 15:25:53 +02:00
parent 246aa14554
commit 2f70ba9e13
@@ -78,12 +78,13 @@ export class AppserviceCommandHandler {
const prefixUsed = prefixes.find(p => body.toLowerCase().startsWith(p.toLowerCase()));
if (!prefixUsed) return;
console.log("Got admin command:", prefixUsed);
let restOfBody = body.substring(prefixUsed.length);
const readItems = readCommand(restOfBody)
console.log("Got admin command:", restOfBody);
const argumentStream = new ArgumentStream(readItems);
const command = this.commandTable.findAMatchingCommand(argumentStream);
if (command) {
console.log("command:", command);
const adaptor = findMatrixInterfaceAdaptor(command);
const context: AppserviceContext = {
appservice: this.appservice,