Platform-independent bot client, currently supporting Discord and Matrix
Go to file
warp03 06877445ca
Run commands in async context
2023-07-19 10:27:03 +02:00
modules discordjs_common: Fixed statsMsg 2021-07-11 14:15:14 +02:00
omz-js-lib@0a47ef0399 Updated omz-js-lib 2021-05-06 17:58:26 +02:00
providers Dont create new id when override is false 2021-06-24 15:04:31 +02:00
types Message send functions of a message object must now return a promise 2021-06-24 13:59:04 +02:00
.gitignore Renamed basehandler to provider 2021-06-24 13:43:34 +02:00
.gitmodules Initial commit 2021-04-18 15:50:12 +02:00
LICENSE Initial commit 2021-04-18 15:50:12 +02:00
README.md Updated readme 2021-04-18 16:37:47 +02:00
baseStructures.json Added capability to send direct messages 2021-05-16 22:47:20 +02:00
bot_client.js Run commands in async context 2023-07-19 10:27:03 +02:00
bot_client_wrapper.js Added supervisor exit request 2021-06-24 15:05:51 +02:00

README.md

UBot client

Platform-independent bot client, allowing you to use the same code for commands for different platforms.
Multiple bot instances may also be run in parallel using a single installation.

Currently, only Discord and Matrix are supported.

Installation

Download source code:

git clone --recurse-submodules https://git.omegazero.org/user94729/ubot-client.git
cd ubot-client

Install the npm packages for the platforms you want to support

You will only need to install the packages if a token for the platform was specified (See Simple Configuration below).

Discord

Discord.js version 12

cd modules/discordjs12
npm install discord.js@12.5.3

Discord.js version 11

cd modules/discordjs11
npm install discord.js@11.6.4

Matrix

cd modules/matrix-sdk
npm install matrix-bot-sdk

Simple Configuration

Create a directory in the installation directory called botData. This is the default data directory for an instance.
Create a file called config.json in the new folder with this content:

{
	"auth": {
		"discordjs": "<discord token here>",
		"matrix-sdk": "<matrix token here>"
	}
}

Either token is optional, but set at least one.

Commands and modules are stored in the commands and modules subdirectory in the data directory, respectively.

Usage

...