Setup

If you want to run graim for your own community, this guide should be the one-stop spot to getting everything set up!

Prerequisites

Getting started

First, you will need to create a Discord bot and a Matrix account (which the bot will use).

Add the bridge to your communities

Follow the tutorial here. You may also run your own bridge, and it is supported; however, that is advanced and out of the scope of this tutorial

Download graim

Open your terminal or command prompt and type these commands:

git clone https://github.com/luphoria/graim
cd graim
npm install

Graim is now installed to your device - but now it needs some configuration.

Create the Discord bot

Create the Matrix bot user

Configure graim

To begin, you are going to need to run some commands.

cp graimdb.json.example graimdb.json
cd config/default.yaml.example default.yaml

Now, open config/default.yaml in your preferred text editor.

Graim is now ready for you to run it! Go back to your terminal, and run npm run start:dev.

Wait a few seconds, and you should see the bot is working!

Invite graim

Now, you have to actually add graim to the communities it is moderating.

Adding the Discord bot

Adding the Matrix bot

Adding yourself to the moderator list

In order to use any graim commands, you first need to be considered a moderator by graim itself.

NOTE: Any new moderators you add will also be able to run adduser - whether they have power level 100 or not.

graim-side room bridging

In order for the lock command to function, you must run bridgeroom <discord channel id> in all rooms/channels.

Logging room

You will probably want a logging room. This can be a public or private room, but either way it must be bridged to Discord. To set a room as the designated logging room, run the command setloggingroom to implement it.

Lint

Lastly, just make sure you've set everything up right! Run the command lint in any channel, and it will tell you any misconfigurations.

Congratulations, you have set up graim!