From 41bbd3526f95d16f9c7b3ab96d6f23087dd0a8d4 Mon Sep 17 00:00:00 2001 From: Sharon Date: Sun, 22 Mar 2020 23:38:07 -0400 Subject: [PATCH 1/5] Update README.md --- README.md | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index f948106..09937e9 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,38 @@ # OCRCC Bot -A simple Matrix bot that handles inviting, uninviting, and notifying Riot users on the recieving end of the [OCRCC chatbox](https://github.com/nomadic-labs/ocrcc-chatbox) +A simple Matrix bot that handles inviting, uninviting, and notifying Riot users on the recieving end of the [OCRCC chatbox](https://github.com/nomadic-labs/ocrcc-chatbox). A demo of this bot is hosted on Glitch: https://glitch.com/edit/#!/nomadic-labs-ocrcc-bot You can remix it and continue developing directly on Glitch. All you need to do is add an `.env` file with the following variables: ``` -MATRIX_SERVER_URL="https://matrix.org" -BOT_DISPLAY_NAME="Example Bot" -BOT_USERNAME="example-bot" -BOT_PASSWORD="password" -BOT_USERID="@example-bot:matrix.org" -FACILITATOR_ROOM_ID="!example:matrix.org" -CHAT_OFFLINE_MESSAGE="There is no-one currently available to chat." -CAPTURE_TRANSCRIPTS=true +MATRIX_SERVER_URL= +BOT_DISPLAY_NAME= +BOT_USERNAME= +BOT_PASSWORD= +BOT_USERID= +FACILITATOR_ROOM_ID= +FACILITATOR_GROUP_ID= +CHAT_OFFLINE_MESSAGE= +CAPTURE_TRANSCRIPTS= ``` +## What does the bot do? +* The bot receives an invitation to every chatroom created by the embedded chatbox, and automatically accepts +* Upon joining a new room, the bot invites all of the members of the Facilitators community +* When the first facilitator accepts the invitation, the bot uninvites the rest of the facilitators +* The bot notifies the Support Chat Notifications chatroom when there is a support request and when a facilitator joins +* If there are no facilitators online, the bot notifies the support seeker +* The bot makes the facilitator a moderator of the chatroom so they can change the room settings (i.e. room name) +* The bot listens to all the incoming messages and prints them to a transcript if that setting is enabled (`CAPTURE_TRANSCRIPT`) +* Messages that start with `!bot` are treated as commands. +* The bot sends a notification to the support chatroom and the Support Chat Notifications room if it crashes + +### Bot commands + +|Command|Response| +|!bot hi|Bot responds with a greeting| +|!bot transcript|Bot sends the chat transcript as a .txt file| +|!bot transcript please|Bot happily sends the transcript :)| ## Local development If you prefer to develop locally instead of on Glitch: From 44d1505a709a7573cf83beb2c9b0d5437db0c5c5 Mon Sep 17 00:00:00 2001 From: Sharon Date: Sun, 22 Mar 2020 23:39:32 -0400 Subject: [PATCH 2/5] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 09937e9..958bb56 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ CAPTURE_TRANSCRIPTS= ### Bot commands |Command|Response| +--- | --- |!bot hi|Bot responds with a greeting| |!bot transcript|Bot sends the chat transcript as a .txt file| |!bot transcript please|Bot happily sends the transcript :)| From 3f3b4ddf39fc99ae3dab9d1856289c44dd7371bc Mon Sep 17 00:00:00 2001 From: Sharon Date: Sun, 22 Mar 2020 23:40:35 -0400 Subject: [PATCH 3/5] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 958bb56..78ffebf 100644 --- a/README.md +++ b/README.md @@ -31,9 +31,9 @@ CAPTURE_TRANSCRIPTS= |Command|Response| --- | --- -|!bot hi|Bot responds with a greeting| -|!bot transcript|Bot sends the chat transcript as a .txt file| -|!bot transcript please|Bot happily sends the transcript :)| +|`!bot hi`|Bot responds with a greeting| +|`!bot transcript`|Bot sends the chat transcript as a .txt file| +|`!bot transcript` please|Bot happily sends the transcript :)| ## Local development If you prefer to develop locally instead of on Glitch: From 64a4365aad5d59869b4299050af0617465ad7c8c Mon Sep 17 00:00:00 2001 From: Sharon Date: Sun, 22 Mar 2020 23:41:18 -0400 Subject: [PATCH 4/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 78ffebf..d733f43 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ CAPTURE_TRANSCRIPTS= --- | --- |`!bot hi`|Bot responds with a greeting| |`!bot transcript`|Bot sends the chat transcript as a .txt file| -|`!bot transcript` please|Bot happily sends the transcript :)| +|`!bot transcript please`|Bot happily sends the transcript :)| ## Local development If you prefer to develop locally instead of on Glitch: From 38cd652cd2c688b7c2849cae88fee194230734c3 Mon Sep 17 00:00:00 2001 From: Sharon Date: Sun, 22 Mar 2020 23:45:42 -0400 Subject: [PATCH 5/5] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d733f43..f836f20 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ CAPTURE_TRANSCRIPTS= * The bot listens to all the incoming messages and prints them to a transcript if that setting is enabled (`CAPTURE_TRANSCRIPT`) * Messages that start with `!bot` are treated as commands. * The bot sends a notification to the support chatroom and the Support Chat Notifications room if it crashes +* On startup, the bot deletes all of the old device IDs for its account ### Bot commands