3 Commits

Author SHA1 Message Date
Sharon Kennedy
139aa3a377 v3.1.0 2022-01-12 12:09:01 -05:00
Sharon Kennedy
f207e7a258 add bot command for bug reports 2022-01-12 12:05:19 -05:00
Sharon
135b9f079a Update README.md 2021-12-20 14:24:18 -05:00
4 changed files with 16 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
# Safe Support Chat Bot
A simple Matrix bot that handles inviting, uninviting, and notifying Riot users on the recieving end of the [Safe Support chatbox](https://github.com/nomadic-labs/safesupport-chatbox).
A simple Matrix bot that handles inviting, uninviting, and notifying Riot users on the recieving end of the [Safe Support chatbox](https://github.com/Safe-Support-Chat/ocrcc-chatbox).
The bot configuration file is `config.json`. It can also pull in user-set configurations from the Safe Support Chat Admin app. To do so, run the command `yarn setup` before starting the bot.
@@ -30,7 +30,7 @@ If you prefer to develop locally instead of on Glitch:
Clone the project
```
git clone https://github.com/nomadic-labs/safesupport-bot.git
git clone https://github.com/Safe-Support-Chat/ocrcc-bot.git
```
Install dependencies

6
dist/bot.js vendored
View File

@@ -276,6 +276,12 @@ class OcrccBot {
const message = responses[Math.floor(Math.random() * responses.length)];
this.sendTextMessage(roomId, message, senderId);
}
}, {
keyword: 'bug',
function: (senderId, roomId) => {
const message = `Please report the issue at ${this.config.bugReportUrl}`;
this.sendTextMessage(roomId, message, senderId);
}
}];
try {

View File

@@ -1,6 +1,6 @@
{
"name": "private-safesupport-bot",
"version": "2.0.2",
"version": "3.1.0",
"description": "Chatbot to manage interactions on Safe Support Chat",
"main": "dist/index.js",
"scripts": {

View File

@@ -266,6 +266,13 @@ class OcrccBot {
const message = responses[Math.floor(Math.random() * responses.length)];
this.sendTextMessage(roomId, message, senderId);
}
},
{
keyword: 'bug',
function: (senderId, roomId) => {
const message = `Please report the issue at ${this.config.bugReportUrl}`
this.sendTextMessage(roomId, message, senderId);
}
}
]
try {