@@ -52,7 +52,7 @@ def define(text):
5252 data ['attrib' ] = ATTRIB_NAMES [data ['sourceDictionary' ]]
5353 return "\x02 {word}\x02 : {text} - {url} ({attrib})" .format (** data )
5454 else :
55- return "I could not find a definition for \x02 {}\x02 ." .format (word )
55+ return "I could not find a definition for \x02 {}\x02 ." .format (text )
5656
5757
5858@hook .command ("wordusage" , "wordexample" , "usage" )
@@ -69,12 +69,12 @@ def word_usage(text):
6969
7070 json = requests .get (url , params = params ).json ()
7171 if json :
72- out = "\x02 {}\x02 : " .format (word )
72+ out = "\x02 {}\x02 : " .format (text )
7373 example = random .choice (json ['examples' ])
7474 out += "{} " .format (example ['text' ])
7575 return " " .join (out .split ())
7676 else :
77- return "I could not find any usage examples for \x02 {}\x02 ." .format (word )
77+ return "I could not find any usage examples for \x02 {}\x02 ." .format (text )
7878
7979
8080@hook .command ("pronounce" , "sounditout" )
@@ -92,10 +92,10 @@ def pronounce(text):
9292 json = requests .get (url , params = params ).json ()
9393
9494 if json :
95- out = "\x02 {}\x02 : " .format (word )
95+ out = "\x02 {}\x02 : " .format (text )
9696 out += " • " .join ([i ['raw' ] for i in json ])
9797 else :
98- return "Sorry, I don't know how to pronounce \x02 {}\x02 ." .format (word )
98+ return "Sorry, I don't know how to pronounce \x02 {}\x02 ." .format (text )
9999
100100 url = API_URL + "word.json/{}/audio" .format (word )
101101
@@ -129,11 +129,11 @@ def synonym(text):
129129 json = requests .get (url , params = params ).json ()
130130
131131 if json :
132- out = "\x02 {}\x02 : " .format (word )
132+ out = "\x02 {}\x02 : " .format (text )
133133 out += " • " .join (json [0 ]['words' ])
134134 return " " .join (out .split ())
135135 else :
136- return "Sorry, I couldn't find any synonyms for \x02 {}\x02 ." .format (word )
136+ return "Sorry, I couldn't find any synonyms for \x02 {}\x02 ." .format (text )
137137
138138
139139@hook .command ()
@@ -153,12 +153,12 @@ def antonym(text):
153153 json = requests .get (url , params = params ).json ()
154154
155155 if json :
156- out = "\x02 {}\x02 : " .format (word )
156+ out = "\x02 {}\x02 : " .format (text )
157157 out += " • " .join (json [0 ]['words' ])
158158 out = out [:- 2 ]
159159 return " " .join (out .split ())
160160 else :
161- return "Sorry, I couldn't find any antonyms for \x02 {}\x02 ." .format (word )
161+ return "Sorry, I couldn't find any antonyms for \x02 {}\x02 ." .format (text )
162162
163163
164164# word of the day
0 commit comments