Why the hell did I decide to make this branch Python 3
This commit is contained in:
parent
68ef55e74d
commit
403ed3bb74
|
@ -51,4 +51,4 @@ def geoip(inp):
|
|||
data["cc"] = record["country_code"] or "N/A"
|
||||
data["country"] = record["country_name"] or "Unknown"
|
||||
data["city"] = record["city"] or "Unknown"
|
||||
return u"\x02Country:\x02 {country} ({cc}), \x02City:\x02 {city}{region}".format(**data)
|
||||
return "\x02Country:\x02 {country} ({cc}), \x02City:\x02 {city}{region}".format(**data)
|
||||
|
|
|
@ -36,10 +36,10 @@ def lastfm(inp, nick='', db=None, bot=None, notice=None):
|
|||
api_key=api_key, user=user, limit=1)
|
||||
|
||||
if 'error' in response:
|
||||
return u"Error: {}.".format(response["message"])
|
||||
return "Error: {}.".format(response["message"])
|
||||
|
||||
if not "track" in response["recenttracks"] or len(response["recenttracks"]["track"]) == 0:
|
||||
return u'No recent tracks for user "{}" found.'.format(user)
|
||||
return 'No recent tracks for user "{}" found.'.format(user)
|
||||
|
||||
tracks = response["recenttracks"]["track"]
|
||||
|
||||
|
@ -66,11 +66,11 @@ def lastfm(inp, nick='', db=None, bot=None, notice=None):
|
|||
album = track["album"]["#text"]
|
||||
artist = track["artist"]["#text"]
|
||||
|
||||
out = u'{} {} "{}"'.format(user, status, title)
|
||||
out = '{} {} "{}"'.format(user, status, title)
|
||||
if artist:
|
||||
out += u" by \x02{}\x0f".format(artist)
|
||||
out += " by \x02{}\x0f".format(artist)
|
||||
if album:
|
||||
out += u" from the album \x02{}\x0f".format(album)
|
||||
out += " from the album \x02{}\x0f".format(album)
|
||||
|
||||
# append ending based on what type it was
|
||||
out += ending
|
||||
|
|
Reference in New Issue