text: """ Powered by @Google
  Available Commands:
  .go <query> credits to owner of bot
  """
  
  import asyncio
  import os
  from re import findall
  import requests
  from bs4 import BeautifulSoup
  from datetime import datetime
  from requests import get
  from urllib.parse import quote_plus
  from urllib.error import HTTPError
  from google_images_download import google_images_download
  from gsearch.googlesearch import search
  from pikabot.utils import ItzSjDude
  from search_engine_parser import GoogleSearch
  
  
  def progress(current, total):
      logger.info("Downloaded {} of {}\nCompleted {}".format(current, total, (current / total) * 100))
  
  
  @ItzSjDude(outgoing=True, pattern="go (.*)")
  async def gsearch(q_event):
      """ For .google command, do a Google search. """
      match = q_event.pattern_match.group(1)
      page = findall(r"page=\d+", match)
      try:
          page = page[0]
          page = page.replace("page=", "")
          match = match.replace("page=" + page[0], "")
      except IndexError:
          page = 1
      search_args = (str(match), int(page))
      gsearch = GoogleSearch()
      gresults = await gsearch.async_search(*search_args)
      msg = ""
      for i in range(len(gresults["links"])):
          try:
              title = gresults["titles"][i]
              link = gresults["links"][i]
              desc = gresults["descriptions"][i]
              msg += f"[{title}]({link})\n`{desc}`\n\n"
          except IndexError:
              break
      await q_event.edit("**Search Query:**\n`" + match + "`\n\n**Results:**\n" +
                         msg,
                         link_preview=False)
  