Matrix bot for new meetings
Go to file
leca 93f746a766 add translation using i18n 2024-08-08 20:44:07 +03:00
deploy deployment & readme update 2024-08-08 16:08:36 +03:00
src add translation using i18n 2024-08-08 20:44:07 +03:00
translations add translation using i18n 2024-08-08 20:44:07 +03:00
.gitignore SEMICOLONS 2024-08-08 09:39:32 +03:00
LICENSE Initial commit 2023-09-24 14:26:10 +03:00
README.md deployment & readme update 2024-08-08 16:08:36 +03:00
db.drawio Added menu and core profile functionality 2024-08-05 21:21:43 +03:00
docker-compose.yml deployment & readme update 2024-08-08 16:08:36 +03:00
meets.env deployment & readme update 2024-08-08 16:08:36 +03:00
messages.json implemented messages 2024-08-08 14:42:20 +03:00
package-lock.json add translation using i18n 2024-08-08 20:44:07 +03:00
package.json add translation using i18n 2024-08-08 20:44:07 +03:00
scheme.psql add translation using i18n 2024-08-08 20:44:07 +03:00

README.md

heart2heart

The heart2heart is a matrix bot that was created as a free and opensource alternative of russian bot daivinchik 'дайвинчик' that is used in similar manner to apps like Tinder. The original bot is fuctioning in Telegram, a messenger mostly known in Russia.

Installation

Bot acccount

Regeistration

To get this bot up and running, you have to register an account for it. I recommend doint it using this script from official SDK repository. Ensure that the homeserver you are about to use for your bot has open registration (no tokens or captchas), otherwise your bot will not be able to register using such method. In case if your homeserver forbids such method of registration, you can try registering an account in a traditional way, using web clients or apps, such as element web. You can extract token by going to settings->help&about->Access token. WARNING!! DO NOT SHOW ANYONE THAT TOKEN! Knowing that token makes you capable of fully controlling a bot! That is an unlikely way, because if you logout (or your session will expire), your token will stop functioning. Prefer method using the script.

Eventually, your bot will hit upon a rate limit. Even if there are only 2 users (beleive me, I tested!) To solve this problem, you can override rate limits for your bot if you are an administrator of a homeserver that hosts your bot OR in good relationships with one! ;) Anyway, you should login to your synape database and type INSERT INTO ratelimit_override VALUES ("@name-of-your-bot:name-of-your-home.server", 0, 0); That will do the trick.

Actual programm

Docker

First, you need to edit config.json according to your needs. Fill in the homeserver you are using and the token. Also, take a fast look at some other options, maybe you'd like to adjust them! Then, you need to edit meets.env to your needs, i.e. database name and password. If you changed db name, you should also change it in docker-compose.yml in postgresql's healthcheck. Finally, to deploy this bot you can use docker. You can build a container using docker, launch postgresql container and freshly built, but why? I'd do it using docker-compose: docker-compose up --build for the first run, wait for [LOG] [I] Bot started! to appear, the ctrl + c, and then just: docker-compose up -d.

Update

git pull docker-compose up --build -d And then you can agan use just docker-compose up -d But who am I to teach you how to use docker?

Traditional

You can deploy this project without docker. To do so, you first need a postgresql database. Connect to it and execute the following (you can change the name meets to whatever you'd like): CREATE DATABASE meets; ALTER DATABASE meets OWNER TO meets; ALTER DATABASE meets OWNER TO meets; ALTER USER meets WITH PASSWORD 'CH@NGME!'; (change CH@NGME to you strong password.) ALTER ROLE meets WITH LOGIN; Assuming, that the database is running locally and on a port 5432, change the variables that you have changed in previous step and use the following command from the root of the project: POSTGRES_USER=meets POSTGRES_PASSWORD=CH@NGME! POSTGRES_DB=meets POSTGRES_HOST=localhost POSTGRES_PORT=5432 node src/index.js

Update:

git pull