Scheduler for muting group & user notifications on Telegram.
-
Telegram TDLib API credentials, which you can register on the telegram website: https://core.telegram.org/api/obtaining_api_id
git clone https://github.com/jasbanza/telegram-mute-scheduler.git
cd telegram-mute-scheduler
npm install
cp /config/config-template.json /config/config.json
Set permissions on config folder so that the background service (root) can create and save the Telegram session.json:
chown root -R config
chmod 766 -R config
Optional - update path to node executable for the ExecStart property in the service file. (root's path might differ to the logged in user / nvm's path, and if it's an older version of nodejs, it might break stuff...)
which node
cp telegram-mute-scheduler.service /etc/systemd/system/telegram-mute-scheduler.service
sudo chmod 755 /etc/systemd/system/telegram-mute-scheduler.service
systemctl daemon-restart
systemctl status telegram-mute-scheduler.service
journalctl -u telegram-mute-scheduler.service
sudo ufw allow 3000