]> git.somenet.org - pub/jan/mattermost-bot.git/blob - README.md
new file: modules/CommandFSOpen.py
[pub/jan/mattermost-bot.git] / README.md
1 # Someone's Mattermost bot.
2  +  Copyright (c) 2016-2022 by Someone <someone@somenet.org> (aka. Jan Vales <jan@jvales.net>)
3  +  published under MIT-License
4
5 Started out as a simple means to lock channels into "read-only" mode by creating outgoing webhooks and deleting every incomming message.
6 + This code is long gone/rebased away.
7
8 Currently this bot's uses range from fun `/threads` `/order` to something helpful `/join-all` and to moderative features like `/ta-wipe-channel` or `/mod-del` and displays dialogs.
9
10
11 ## Installation:
12 + pip3 install --user --upgrade -r requirements.txt
13 + create a config.py file from config.py.example.
14 + make systemd start this bot (see somebot.service)
15 + periodically run some cronjobs, like these:
16
17     ### bot command stats
18
19     */5 * * * *   (XDG_RUNTIME_DIR=/run/user/1002 systemctl --user kill -s SIGUSR1 somebot.service) &> /dev/null
20
21     59 11 * * *   (cd /srv/mattermost/mattermost-bot; python3 -u command_stats_printer.py | python3 -m mattermost.stdin2channel http://localhost:8065/api user pw channel '``AUTODELETE-DAY`` #command_usage #mmstats\n```\n' '\n```'; rm  /tmp/somebot_command_stats.json) &> /dev/null
22