def handle(self, *args: Any, **options: str) -> None:
    bot_email = options['bot_email']
    service_name = options['service_name']
    base_url = options['base_url']
    realm = self.get_realm(options)
    if (not bot_email):
        print('Email of existing bot must be provided')
        exit(1)
    if (not service_name):
        print('Name for Service object must be provided')
        exit(1)
    if (not base_url):
        print('Endpoint URL of outgoing webhook must be provided')
        exit(1)
    bot_profile = self.get_user(email=bot_email, realm=realm)
    if (not bot_profile.is_bot):
        print(('User %s is not a bot' % (bot_email,)))
        exit(1)
    if bot_profile.is_outgoing_webhook_bot:
        print(('%s is already marked as an outgoing webhook bot' % (bot_email,)))
        exit(1)
    Service.objects.create(name=service_name, user_profile=bot_profile, base_url=base_url, token='', interface=1)
    bot_profile.bot_type = UserProfile.OUTGOING_WEBHOOK_BOT
    bot_profile.save()
    print(('Successfully converted %s into an outgoing webhook bot' % (bot_email,)))
def handle(self, *args: Any, **options: str) -> None:
    bot_email = options['bot_email']
    service_name = options['service_name']
    base_url = options['base_url']
    realm = self.get_realm(options)
    if (not bot_email):
        print('Email of existing bot must be provided')
        exit(1)
    if (not service_name):
        print('Name for Service object must be provided')
        exit(1)
    if (not base_url):
        print('Endpoint URL of outgoing webhook must be provided')
        exit(1)
    bot_profile = self.get_user(email=bot_email, realm=realm)
    if (not bot_profile.is_bot):
        print(('User %s is not a bot' % (bot_email,)))
        exit(1)
    if bot_profile.is_outgoing_webhook_bot:
        print(('%s is already marked as an outgoing webhook bot' % (bot_email,)))
        exit(1)
    Service.objects.create(name=service_name, user_profile=bot_profile, base_url=base_url, token=, interface=1)
    bot_profile.bot_type = UserProfile.OUTGOING_WEBHOOK_BOT
    bot_profile.save()
    print(('Successfully converted %s into an outgoing webhook bot' % (bot_email,)))