Files
zulip/zerver/management/commands/send_welcome_bot_message.py
Lauryn Menard a5b527f321 onboarding: Specialize Welcome Bot message for education organizations.
Because education organizations and users have slightly specialized
use cases, we update the Welcome Bot message content sent to new
users and new organization owners for these types of organizations
to link to help center articles/guides geared toward these users
and organizations.

Also, updates the demo organization warning to only go to the new
demo organization owner because the 30 day deletion text is only
definitely accurate when the organization is created.

Fixes #21694.
2023-05-01 16:48:48 -07:00

22 lines
773 B
Python

from argparse import ArgumentParser
from typing import Any
from zerver.lib.management import ZulipBaseCommand
from zerver.lib.onboarding import send_initial_direct_message
class Command(ZulipBaseCommand):
help = """Sends the initial welcome bot message."""
def add_arguments(self, parser: ArgumentParser) -> None:
self.add_user_list_args(
parser,
help="Email addresses of user(s) to send welcome bot messages to.",
all_users_help="Send to every user on the realm.",
)
self.add_realm_args(parser)
def handle(self, *args: Any, **options: str) -> None:
for user_profile in self.get_users(options, self.get_realm(options), is_bot=False):
send_initial_direct_message(user_profile)