Deleting Users in rails console

I see this error. I found the user by username. (Unable to use email for some reason)

Discourse::InvalidAccess: can_delete_user? failed
from /var/www/discourse/lib/guardian/ensure_magic.rb:11:in `method_missing'

The command

UserDestroyer.new(Discourse.system_user).destroy(User.find_by(username: "someuserwhocertainlyexists"), delete_posts: true)