delete js index file - this is now the compiled output

This commit is contained in:
array-in-a-matrix 2023-12-03 17:47:53 -05:00
parent 6dd7d91321
commit 434652eb5c

View file

@ -1,25 +0,0 @@
import config from './config.json' assert {type: "json"};
import { MatrixClient, SimpleFsStorageProvider, AutojoinRoomsMixin, RichRepliesPreprocessor } from "matrix-bot-sdk";
const storage = new SimpleFsStorageProvider("storage.json");
const client = new MatrixClient(config.homeserver, config.token, storage);
AutojoinRoomsMixin.setupOnClient(client);
client.addPreprocessor(new RichRepliesPreprocessor(false));
client.start().then(() => console.log(`Client has started!`));
// ? event listener
client.on("room.message", (roomId, event) => {
// ? check if the message's text is not empty and isn't sent by the bot itself
if (! event["content"] || event["sender"] === config.user) return;
const message = event["content"]["body"].toLowerCase();
// ? if message starts with the bot's <prefix + command> then execute the command
if (message.startsWith(config.prefix + "COMMAND")){
//
// TODO: START CODE HERE
//
}
})