def run (message):
    '''
        Run

        Run the custom plugin specific code. A returned
        string is the message that will be sent back
        to the user.

        --
        @param  message:dict    The message sent by the user

        @return str
    '''

    # Get the message contents
    text = message['text']

    # Remove a mention. This could be the case
    # if the bot was mentioned in a chat room
    if text.startswith('@'):
        text = text.split(' ', 1)[1].strip()

    # Some bots will accept commands that started
    # with a '/'
    if text.startswith('/'):
        text = text.replace('/', '', 1).strip()

    # Try and determine what was the trigger command
    # for this plugin.
    action = text.split(' ')[0].strip()

    # Hopefully we never get here, but just in case.
    if action not in commands():
        return 'Sorry, I don\'t know what to do with: {command}'.format(
            command = action)

    # Remove the trigger command
    for command in commands():
        text = ignore_case_replace(command, '', text).strip()

    if text == 'help':
        return _show_help()

    if text in ['neutral', 'explicit', 'chuck', 'all']:
        return pyjokes.get_joke(language = 'en', category = text)

    # Default to a neutral joke
    return pyjokes.get_joke(language = 'en', category = 'all')
dataset/ETHPy150Open leonjza/hogar/hogar/Plugins/Joke/main.py/run/original