def __init__(self, integration_url, bot_name=None, icon_url=None, icon_emoji=None, channel=None, markdown=None):
        self.url        = integration_url
        self.username   = bot_name
        self.icon_url   = icon_url
        self.icon_emoji = icon_emoji
        self.channel    = channel
        self.mrkdwn     = markdown
        # Check if the channel has a '#' or '@' at the beginning. If not,
        # throw an error.
        if not self.username and self.username is not None:
            raise ValueError("Null username specified.")
        if not self.channel and self.channel is not None:
            raise ValueError("Null channel specified.")
        if (channel is not None and not self.channel.startswith('#')
            and not self.channel.startswith('@')):
            raise ValueError(
                "Invalid channel. Need a '#' for channels or '@' for direct " +
                "messages."
            )
    ############################################################################
    # Public methods.
Creates a IncomingWebhooksSender object to send messages to a given
dataset/ETHPy150Open univ-of-utah-marriott-library-apple/management_tools/management_tools/slack.py/IncomingWebhooksSender.__init__