# Path: constants/exceptions.py
# class invalidArgumentsException(Exception):
# class loginFailedException(Exception):
# class userBannedException(Exception):
# class userLockedException(Exception):
# class noBanchoSessionException(Exception):
# class osuApiFailException(Exception):
# class fileNotFoundException(Exception):
# class invalidBeatmapException(Exception):
# class unsupportedGameModeException(Exception):
# class beatmapTooLongException(Exception):
# class need2FAException(Exception):
# class noAPIDataError(Exception):
# class scoreNotFoundError(Exception):
# class ppCalcException(Exception):
# 	def __init__(self, handler):
# 	def __init__(self, handler, who):
# 	def __init__(self, handler, who):
# 	def __init__(self, handler, who):
# 	def __init__(self, handler, who, ip):
# 	def __init__(self, handler):
# 	def __init__(self, handler, f):
# 	def __init__(self, handler):
# 	def __init__(self, handler, who, ip):
# 	def __init__(self, exception):
# 
# Path: objects/glob.py
# 		VERSION = f.read().strip()
# 	VERSION = "Unknown"
# ACHIEVEMENTS_VERSION = 1
# DATADOG_PREFIX = "lets"


import tornado.gen
import tornado.web
from common.log import logUtils as log
from common.ripple import userUtils
from common.sentry import sentry
from common.web import requestsManager
from constants import exceptions
from objects import glob
		return handler.CLIENT_WHO[y["who"]] + (
			("|{}".format(y["special_format"])) if y["special_format"] is not None else ""
		)

	def _getComments(self):
		output = ""

		try:
			beatmapID = int(self.get_argument("b", default=0))
			beatmapSetID = int(self.get_argument("s", default=0))
			scoreID = int(self.get_argument("r", default=0))
		except ValueError:
			raise exceptions.invalidArgumentsException(self.MODULE_NAME)

		if beatmapID <= 0:
			return

		log.info("Requested comments for beatmap id {}".format(beatmapID))

		# Merge beatmap, beatmapset and score comments
		for x in (
				{"db_type": "beatmap_id", "client_type": "map", "value": beatmapID},
				{"db_type": "beatmapset_id", "client_type": "song", "value": beatmapSetID},
				{"db_type": "score_id", "client_type": "replay", "value": scoreID},
		):
			# Add this set of comments only if the client has set the value
			if x["value"] <= 0:
				continue

			# Fetch these comments

# Path: constants/exceptions.py
# class invalidArgumentsException(Exception):
# class loginFailedException(Exception):
# class userBannedException(Exception):
# class userLockedException(Exception):
# class noBanchoSessionException(Exception):
# class osuApiFailException(Exception):
# class fileNotFoundException(Exception):
# class invalidBeatmapException(Exception):
# class unsupportedGameModeException(Exception):
# class beatmapTooLongException(Exception):
# class need2FAException(Exception):
# class noAPIDataError(Exception):
# class scoreNotFoundError(Exception):
# class ppCalcException(Exception):
# 	def __init__(self, handler):
# 	def __init__(self, handler, who):
# 	def __init__(self, handler, who):
# 	def __init__(self, handler, who):
# 	def __init__(self, handler, who, ip):
# 	def __init__(self, handler):
# 	def __init__(self, handler, f):
# 	def __init__(self, handler):
# 	def __init__(self, handler, who, ip):
# 	def __init__(self, exception):
# 
# Path: objects/glob.py
# 		VERSION = f.read().strip()
# 	VERSION = "Unknown"
# ACHIEVEMENTS_VERSION = 1
# DATADOG_PREFIX = "lets"


# Path: handlers/commentHandler.py
import tornado.gen
import tornado.web
from common.log import logUtils as log
from common.ripple import userUtils
from common.sentry import sentry
from common.web import requestsManager
from constants import exceptions
from objects import glob

		return handler.CLIENT_WHO[y["who"]] + (
			("|{}".format(y["special_format"])) if y["special_format"] is not None else ""
		)

	def _getComments(self):
		output = ""

		try:
			beatmapID = int(self.get_argument("b", default=0))
			beatmapSetID = int(self.get_argument("s", default=0))
			scoreID = int(self.get_argument("r", default=0))
		except ValueError:
			raise exceptions.invalidArgumentsException(self.MODULE_NAME)

		if beatmapID <= 0:
			return

		log.info("Requested comments for beatmap id {}".format(beatmapID))

		# Merge beatmap, beatmapset and score comments
		for x in (
				{"db_type": "beatmap_id", "client_type": "map", "value": beatmapID},
				{"db_type": "beatmapset_id", "client_type": "song", "value": beatmapSetID},
				{"db_type": "score_id", "client_type": "replay", "value": scoreID},
		):
			# Add this set of comments only if the client has set the value
			if x["value"] <= 0:
				continue

			# Fetch these comments

			comments = glob.db.fetchAll(