Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
139aa3a377 | ||
|
|
f207e7a258 | ||
|
|
135b9f079a |
@@ -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
6
dist/bot.js
vendored
@@ -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 {
|
||||
|
||||
@@ -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": {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user