From f1007f5d89ccfd4a83744c33a3597482151ea6df Mon Sep 17 00:00:00 2001 From: Luke Robles Date: Mon, 21 Nov 2022 09:27:56 -0800 Subject: [PATCH] Fixing define --- app/define_word.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/define_word.py b/app/define_word.py index 5e1ae641..4cfc07d6 100755 --- a/app/define_word.py +++ b/app/define_word.py @@ -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", )