Corrected syntax error
This commit is contained in:
parent
ec191c06fa
commit
6ce5a0f101
|
@ -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)
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue