If you want to run graim for your own community, this guide should be the one-stop spot to getting everything set up!
First, you will need to create a Discord bot and a Matrix account (which the bot will use).
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
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.
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.
accessTokento whatever your Matrix user's access token is.
true(you will want to disable this after setup but it isn't a big deal).
discordTokento your Discord bot's access token.
discordClientto your Discord application's "client ID" or "application ID".
discordGuildto the Discord guild (server) you want it to be active in.
discordMutedRoleto a role in aforementioned guild, which presumably prevents the user from speaking.
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!
Now, you have to actually add graim to the communities it is moderating.
https://discordapp.com/api/oauth2/authorize?client_id=<YOUR CLIENT ID HERE>
graimrole in your roles list is placed higher than the
mutedrole - otherwise, graim will crash if you try to mute.
Moderator(power level 50), and adjust
Change permissionsin the room to
Moderator- this will allow it to change other users' power levels to -1, effectively muting them. Additionally, it is highly recommended you change
Admin- otherwise a user could potentially elevate their permissions via the bot to ping @room.
In order to use any graim commands, you first need to be considered a moderator by graim itself.
;adduser <alias> @user:matrixexample.org @discorduser moderatorfrom an Admin (power level 100) account on Matrix.
NOTE: Any new moderators you add will also be able to run
adduser - whether they have power level 100 or not.
Congratulations, you have set up graim!