Fixing define

This commit is contained in:
Luke Robles 2022-11-21 09:27:56 -08:00
parent e07335269e
commit 81e97e88f2

View File

@ -13,7 +13,7 @@ def get_definition(word):
"""
try:
definition = requests.get(
"https://api.urbandictionary.com/v0/define?term={}".format("%20".join(word))
"https://api.urbandictionary.com/v0/define?term={}".format(word)
).json()["list"]
# UD returns all the results in a json blob. Calculate which result has the highest upvotes to downvotes ratio
# as this is the result that shows up at the top on urbandictionary.com
@ -41,7 +41,7 @@ def get_definition(word):
definition = "No definition found"
embed = discord.Embed(
description="%s:\n%s" % (" ".join(word), definition),
description="%s:\n%s" % (word, definition),
color=0x428BCA,
type="rich",
)