1
0
Fork 0
mirror of synced 2024-06-03 03:04:33 +12:00

Corrected syntax error

This commit is contained in:
Phxntxm 2016-07-25 09:30:20 -05:00
parent ec191c06fa
commit 6ce5a0f101
2 changed files with 6 additions and 6 deletions

View file

@ -61,7 +61,7 @@ def updateBattleRecords(winner, loser):
winner_stats = {'wins':winner_wins,'losses':winner_losses,'rating':winner_rating}
loser_stats = {'wins':loser_wins,'losses':loser_losses,'rating':loser_rating}
battles[winner.id] = winner_stats
battles[loser.id] = loser.stats
battles[loser.id] = loser_stats
return config.saveContent('battle_records', battles)

View file

@ -16,11 +16,11 @@ class Links:
@checks.customPermsOrRole("send_messages")
async def urban(self, *msg: str):
"""Pulls the top urbandictionary.com definition for a term"""
url = "http://api.urbandictionary.com/v0/define?term={}".format('+'.join(msg))
with aiohttp.ClientSession() as s:
async with s.get(url) as r:
response = await r.text()
data = json.loads(response)
url = "http://api.urbandictionary.com/v0/define?term={}".format('+'.join(msg))
with aiohttp.ClientSession() as s:
async with s.get(url) as r:
response = await r.text()
data = json.loads(response)
try:
if len(data['list']) == 0: