Reddit bot for automatic Fubuki copypasta.
Following instructions are for Raspbian GNU/Linux 10 (buster)
, but they should be very similar for any other Debian/Ubuntu based OS.
python3.9 -m pip install -U -r requirements.txt
Create config.json
file with your API credentials and other configuration.
{
"author": "YOUR_USER_NAME",
"subreddits": ["hololive", "hololewd", "test"],
"client_id": "***********",
"client_secret": "***********",
"username": "fbk_glasses_bot",
"password": "***********"
}
python3.9 fbk_glasses_bot.py
To automatically start the bot as a system service, create a new file /etc/systemd/system/fbk_glasses_bot.service
. Replace YOUR_USER_NAME
with your username, and check that the working directory is correct.
[Service]
WorkingDirectory=/home/YOUR_USER_NAME/fbk_glasses_bot
ExecStart=/usr/local/bin/python3.9 fbk_glasses_bot.py
Restart=always
User=YOUR_USER_NAME
Group=YOUR_USER_NAME
[Install]
WantedBy=multi-user.target
Start the service and make it automatically start at boot.
sudo systemctl daemon-reload
sudo systemctl start fbk_glasses_bot
sudo systemctl enable fbk_glasses_bot
You can check status and logs with these commands.
sudo systemctl status fbk_glasses_bot
sudo journalctl -u fbk_glasses_bot
Configure pre-commit.
python3.9 -m pip --no-cache-dir install pre-commit
pre-commit install