import base64


def base64_decode(bot, trigger):
    """Decodes a base64 string."""
    if not trigger.group(2):
        return bot.reply('I need something to decode.')

    try:
        decodedBytes = base64.b64decode(trigger.group(2).encode('utf-8'))
        decodedStr = str(decodedBytes, 'utf-8')
        bot.say(decodedStr)
    except Exception:
        bot.reply('I need real base64, fool.')