def run(bot, chat_id, user, keyConfig='', message='', totalResults=1):
    requestText = str(message)
    if (requestText == ''):
        totalSteamGames = int(Get_steam_total())
        totalGOGGames = int(Get_GOG_total())
        if ((totalSteamGames is not None) and (totalGOGGames is not None)):
            bot.sendMessage(chat_id=chat_id, text=(((("I'm sorry " + (user if (not (user == '')) else 'Dave')) + ', there are ') + str((int(totalSteamGames) + int(totalGOGGames)))) + ' total games on Steam and GOG combined. Pick one.'))
            return True
    retryCount = 3
    appId = ''
    while ((retryCount > 0) and (appId == '')):
        retryCount -= 1
        rawSteamSearchResultsMarkup = urllib.urlopen(('http://store.steampowered.com/search/?category1=998&term=' + requestText)).read()
        appId = steam_results_parser(rawSteamSearchResultsMarkup)
    if appId:
        steamGameLink = ('http://store.steampowered.com/app/' + appId)
        bypassAgeGate = urllib2.build_opener()
        bypassAgeGate.addheaders.append(('Cookie', 'mature_content=1; path=/; max-age=31536000;expires=Fri, 26 Mar 2027 20:00:00 GMT'))
        bypassAgeGate.open(steamGameLink)
        bypassAgeGate.addheaders.append(('Cookie', 'birthtime=0; path=/; max-age=31536000;expires=Fri, 26 Mar 2027 20:00:00 GMT'))
        code = bypassAgeGate.open(steamGameLink).read()
        if ('id="agegate_wizard"' in code):
            gameTitle = steam_age_gate_parser(code)
            bot.sendMessage(chat_id=chat_id, text=((((("I'm sorry " + (user if (not (user == '')) else 'Dave')) + ', I\'m afraid that "') + gameTitle) + '" is protected by an age gate.\n') + steamGameLink))
            return False
        gameResults = steam_game_parser(code, steamGameLink)
        try:
            bot.sendMessage(chat_id=chat_id, text=gameResults, disable_web_page_preview=True, parse_mode='Markdown')
        except:
            bot.sendMessage(chat_id=chat_id, text=gameResults)
        return True
    else:
        gogSearchData = json.load(urllib.urlopen(('http://embed.gog.com/games/ajax/filtered?mediaType=game&search=' + requestText)))
        (appId, price, discount) = gog_results_parser(gogSearchData)
        if appId:
            gogGameLink = (('http://api.gog.com/products/' + str(appId)) + '?expand=downloads,expanded_dlcs,description,screenshots,videos,related_products,changelog')
            data = json.load(urllib.urlopen(gogGameLink))
            gameResults = gog_game_parser(data, price, discount)
            bot.sendMessage(chat_id=chat_id, text=gameResults, disable_web_page_preview=True, parse_mode='Markdown')
        else:
            bot.sendMessage(chat_id=chat_id, text=((("I'm sorry " + (user if (not (user == '')) else 'Dave')) + ", I'm afraid I can't find the game ") + requestText.encode('utf-8')))
def run(bot, chat_id, user, keyConfig=, message=, totalResults=1):
    requestText = str(message)
    if (requestText == ):
        totalSteamGames = int(Get_steam_total())
        totalGOGGames = int(Get_GOG_total())
        if ((totalSteamGames is not None) and (totalGOGGames is not None)):
            bot.sendMessage(chat_id=chat_id, text=(((("I'm sorry " + (user if (not (user == )) else 'Dave')) + ', there are ') + str((int(totalSteamGames) + int(totalGOGGames)))) + ' total games on Steam and GOG combined. Pick one.'))
            return True
    retryCount = 3
    appId = 
    while ((retryCount > 0) and (appId == )):
        retryCount -= 1
        rawSteamSearchResultsMarkup = urllib.urlopen(('http://store.steampowered.com/search/?category1=998&term=' + requestText)).read()
        appId = steam_results_parser(rawSteamSearchResultsMarkup)
    if appId:
        steamGameLink = ('http://store.steampowered.com/app/' + appId)
        bypassAgeGate = urllib2.build_opener()
        bypassAgeGate.addheaders.append(('Cookie', 'mature_content=1; path=/; max-age=31536000;expires=Fri, 26 Mar 2027 20:00:00 GMT'))
        bypassAgeGate.open(steamGameLink)
        bypassAgeGate.addheaders.append(('Cookie', 'birthtime=0; path=/; max-age=31536000;expires=Fri, 26 Mar 2027 20:00:00 GMT'))
        code = bypassAgeGate.open(steamGameLink).read()
        if ('id="agegate_wizard"' in code):
            gameTitle = steam_age_gate_parser(code)
            bot.sendMessage(chat_id=chat_id, text=((((("I'm sorry " + (user if (not (user == )) else 'Dave')) + ', I\'m afraid that "') + gameTitle) + '" is protected by an age gate.\n') + steamGameLink))
            return False
        gameResults = steam_game_parser(code, steamGameLink)
        try:
            bot.sendMessage(chat_id=chat_id, text=gameResults, disable_web_page_preview=True, parse_mode='Markdown')
        except:
            bot.sendMessage(chat_id=chat_id, text=gameResults)
        return True
    else:
        gogSearchData = json.load(urllib.urlopen(('http://embed.gog.com/games/ajax/filtered?mediaType=game&search=' + requestText)))
        (appId, price, discount) = gog_results_parser(gogSearchData)
        if appId:
            gogGameLink = (('http://api.gog.com/products/' + str(appId)) + '?expand=downloads,expanded_dlcs,description,screenshots,videos,related_products,changelog')
            data = json.load(urllib.urlopen(gogGameLink))
            gameResults = gog_game_parser(data, price, discount)
            bot.sendMessage(chat_id=chat_id, text=gameResults, disable_web_page_preview=True, parse_mode='Markdown')
        else:
            bot.sendMessage(chat_id=chat_id, text=((("I'm sorry " + (user if (not (user == )) else 'Dave')) + ", I'm afraid I can't find the game ") + requestText.encode('utf-8')))