1 # Someone's Mattermost bot.
2 + Copyright (c) 2016-2020 by Someone <someone@somenet.org> (aka. Jan Vales <jan@jvales.net>)
3 + published under MIT-License
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.
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 `/ta-mod-del`.
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:
19 */5 * * * * (XDG_RUNTIME_DIR=/run/user/1002 systemctl --user kill -s SIGUSR1 somebot.service) &> /dev/null
20 59 11 * * * (cd /home/someone/mattermost/; python3 -u somebot/command_stats_printer.py | python3 -u post_stdin_to_mm.py bot-username bot-pw debug-channel-id '``BOT-AUTODELETE-FAST`` #command_usage #mmstats\n```\n' '\n```'; rm /tmp/somebot_command_stats.json) &> /dev/null