44 lines
1006 B
JavaScript
44 lines
1006 B
JavaScript
"use strict";
|
|
|
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
|
|
var _bot = _interopRequireDefault(require("./bot"));
|
|
|
|
require('dotenv').config();
|
|
|
|
const ENCRYPTION_CONFIG = {
|
|
algorithm: "m.megolm.v1.aes-sha2"
|
|
};
|
|
const KICK_REASON = "A facilitator has already joined this chat.";
|
|
const BOT_ERROR_MESSAGE = "Something went wrong on our end, please restart the chat and try again.";
|
|
const MAX_RETRIES = 3;
|
|
const {
|
|
MATRIX_SERVER_URL,
|
|
BOT_USERNAME,
|
|
BOT_USERID,
|
|
BOT_PASSWORD,
|
|
BOT_DISPLAY_NAME,
|
|
FACILITATOR_ROOM_ID,
|
|
CAPTURE_TRANSCRIPTS,
|
|
CHAT_NOT_AVAILABLE_MESSAGE,
|
|
MAX_WAIT_TIME,
|
|
MAX_INACTIVE
|
|
} = process.env;
|
|
const botConfig = {
|
|
ENCRYPTION_CONFIG,
|
|
KICK_REASON,
|
|
BOT_ERROR_MESSAGE,
|
|
MAX_RETRIES,
|
|
MATRIX_SERVER_URL,
|
|
BOT_USERNAME,
|
|
BOT_USERID,
|
|
BOT_PASSWORD,
|
|
BOT_DISPLAY_NAME,
|
|
FACILITATOR_ROOM_ID,
|
|
CAPTURE_TRANSCRIPTS,
|
|
CHAT_NOT_AVAILABLE_MESSAGE,
|
|
MAX_WAIT_TIME,
|
|
MAX_INACTIVE
|
|
};
|
|
const bot = new _bot.default(botConfig);
|
|
bot.start(); |