-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Adjustments to make functionality more agnostic.
- Loading branch information
Ian Moffitt
committed
Apr 8, 2022
1 parent
54c3e81
commit f85e132
Showing
6 changed files
with
756 additions
and
10,864 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,35 @@ | ||
# Slack Catbot | ||
|
||
Run as a node service | ||
Run as a node service. For example, using systemctl: | ||
|
||
/etc/systemd/system/catbot.service | ||
``` | ||
[Unit] | ||
Description=Catbot | ||
After=network.target | ||
[Service] | ||
Environment=NODE_PORT=3001 | ||
User=root | ||
Restart=always | ||
RestartSec=1000ms | ||
StandardOutput=/var/log/catbotlog.log | ||
StandardError=/var/log/catboterr.log | ||
ExecStart=/usr/local/bin/node /usr/local/bin/slack-catbot/index.js | ||
RuntimeMaxSec=14400s | ||
[Install] | ||
WantedBy=multi-user.target | ||
``` | ||
|
||
This will allow him to start on boot. | ||
`systemctl enable catbot.service` | ||
|
||
Start or stop | ||
`systemctl start/stop catbot` | ||
|
||
Create a bot.json file off the example. | ||
|
||
Refer to rooms and people by their IDs, not canonical names. You can find Room IDs by expanding the channel info of a room. The ID is usually at the bottom. A member ID is in a user's profile, under the "More" menu. | ||
|
||
Create a slack bot and populate the config with the access token and name of the bot. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.