from flask_script import Command

from twoxy.database import db_ctx as db

class Command(Command):
    """Blacklists a Twitter handle specified by the user."""

    def run(self):
        from ..database.models import Blacklisted
        db.session.add(Blacklisted(input("Handle (without prepended @):")))
        db.session.commit()
