Beware that using the Rails console is an extraordinary action, and if you remove the wrong AI bot, you can break some functionality. Check this:
I think you can also remove admin privileges before deleting users from the GUI.
- Entering into the Rails console (you want to backup just in case):
cd /var/discourse/
./launcher enter app
rails c
- Removing the privileges:
u = User.find_by(username: "BOT_USERNAME")
u.revoke_admin!