Fixing define
This commit is contained in:
parent
e07335269e
commit
81e97e88f2
@ -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",
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user