Added short bot credentials setup guide

Wrote a step-by-step guide for bot credentials in README.md

Also added a comment to explain the auto join being commented out.
master
Peery 7 years ago committed by lub
parent b20439db97
commit 430b4178ac

@ -0,0 +1,14 @@
# Heimdall
## Description
*Heimdall* is a matrix bot supposed to control and manage services and containers by simple text commands.
It is a convenience tool for the own self-hosting empire.
## Setup the bot credentials
1. Create or get access to a **matrix account** to use as the bot.
2. Acquire the **access token** and **user id**. You can do this in riot by going into the settings and scrolling down to the very end.
3. Copy *config.sample.yaml* and name the copy *config.yaml*.
4. Replace the placeholder values with your own:
* Replace the *baseurl* value with the base url of your home server (e.g. *https://example.org*).
* Replace the *access token* with your own.
* Replace the *user id* with your own.

@ -11,6 +11,7 @@ const matrixclient = sdk.createClient({
userId: config.userid userId: config.userid
}); });
// Autojoin for the bot (keep commented out when not needed to prevent abuse)
/*matrixclient.on('RoomMember.membership', function(event, member) { /*matrixclient.on('RoomMember.membership', function(event, member) {
if(member.membership === 'invite' && member.userId === userid) { if(member.membership === 'invite' && member.userId === userid) {
matrixclient.joinRoom(member.roomId).done(function() { matrixclient.joinRoom(member.roomId).done(function() {