Don't use // and [] in the output for i//
This commit is contained in:
parent
2f999368a3
commit
7c7f7bff0f
7
index.ts
7
index.ts
|
@ -1,16 +1,13 @@
|
||||||
const version = "2.0.1";
|
const version = "2.0.2";
|
||||||
import x2i from "./x2i";
|
import x2i from "./x2i";
|
||||||
import { existsSync } from "fs";
|
import { existsSync } from "fs";
|
||||||
|
|
||||||
const config = (existsSync("./config.json")) ? require("./config.json") : {};
|
const config = (existsSync("./config.json")) ? require("./config.json") : {};
|
||||||
|
|
||||||
console.log(process.env.MATRIXDEV_HOMESERVER);
|
|
||||||
console.log(process.env.MATRIXDEV_TOKEN);
|
|
||||||
|
|
||||||
const MatrixClient = require("matrix-bot-sdk").MatrixClient;
|
const MatrixClient = require("matrix-bot-sdk").MatrixClient;
|
||||||
const AutojoinRoomsMixin = require("matrix-bot-sdk").AutojoinRoomsMixin;
|
const AutojoinRoomsMixin = require("matrix-bot-sdk").AutojoinRoomsMixin;
|
||||||
|
|
||||||
const homeserver = (config.homeserver || process.env.WUG_HOMESERVER || process.env.MATRIXDEV_HOMESERVER);
|
const homeserver = (config.homeserver || process.env.WUG_HOMESERVER || process.env.MATRIXDEV_HOMESERVER);
|
||||||
const token = (config.token || process.env.WUG_TOKEN || process.env.MATRIXDEV_TOKEN);
|
const token = (config.token || process.env.WUG_TOKEN || process.env.MATRIXDEV_TOKEN);
|
||||||
|
|
||||||
const client = new MatrixClient(homeserver, token);
|
const client = new MatrixClient(homeserver, token);
|
||||||
|
|
|
@ -48,6 +48,7 @@ const matchType: { [key: string]: IMatchInstructions } = {
|
||||||
keys: readKeys("./x2i/z2i-keys.yaml"),
|
keys: readKeys("./x2i/z2i-keys.yaml"),
|
||||||
},
|
},
|
||||||
i: {
|
i: {
|
||||||
|
join: (_, match) => `|${match}|`,
|
||||||
keys: readKeys("./x2i/i-keys.yaml"),
|
keys: readKeys("./x2i/i-keys.yaml"),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue