#!/usr/bin/env bash
# Absolute Raid Bot - unpair from the Discord server and make a new pairing code. Run: sudo arb-pair-reset
set -euo pipefail
read -rp "Unpair the bot from its Discord server? It stops answering until paired again. Type YES: " A
[ "$A" = "YES" ] || { echo "Nothing changed."; exit 0; }
systemctl stop absolute-raid-bot
cd /opt/absolute-raid-bot
sudo -u arb /opt/absolute-raid-bot/venv/bin/python run.py --new-pairing-code
systemctl start absolute-raid-bot
