@@ -109,25 +109,23 @@ async def on_ready():
109
109
110
110
# -----------------------------------------------------------------------------
111
111
112
- HOWSIGN_TEMPLATE = """{word_uppercased}
113
- _Handspeak_ : {handspeak}
114
- _Lifeprint_ : {lifeprint}
115
- _SigningSavvy_: <{signingsavvy}>
116
- _Spread The Sign_: <{spread_the_sign}>
117
- _YouGlish_: {youglish}
112
+ HOWSIGN_TEMPLATE = """[👋 **Handspeak** - Search results]({handspeak})
113
+ [🧬 **Lifeprint** - Search results]({lifeprint})
114
+ [🤝 **SigningSavvy** - Sign for {word_uppercased}]({signingsavvy})
115
+ [🌐 **Spread The Sign** - {word_uppercased}]({spread_the_sign})
116
+ [📹 **YouGlish** - Videos containing {word_uppercased}]({youglish})
118
117
"""
119
118
120
- HOWSIGN_SPOILER_TEMPLATE = """||{word_uppercased}||
121
- _Handspeak_ : || {handspeak} ||
122
- _Lifeprint_ : || {lifeprint} ||
123
- _SigningSavvy_: || <{signingsavvy}> ||
124
- _Spread The Sign_: || <{spread_the_sign}> ||
125
- _YouGlish_: || {youglish} ||
119
+ HOWSIGN_SPOILER_TEMPLATE = """[👋 **Handspeak** - Search results]({handspeak})
120
+ [🧬 **Lifeprint** - Search results]({lifeprint})
121
+ [🤝 **SigningSavvy** - Sign for ||{word_uppercased}||]({signingsavvy})
122
+ [🌐 **Spread The Sign** - ||{word_uppercased}||]({spread_the_sign})
123
+ [📹 **YouGlish** - Videos containing ||{word_uppercased}||]({youglish})
126
124
"""
127
125
128
126
HOWSIGN_HELP = """Look up a word or phrase
129
127
130
- If the word or phrase is sent in spoiler text, i.e. enclosed in `||`, the corresponding links will be blacked out.
128
+ If the word or phrase is sent in spoiler text, i.e. enclosed in `||`, the word will also be blacked out in the reply .
131
129
132
130
Examples:
133
131
{COMMAND_PREFIX}howsign tiger
@@ -141,22 +139,21 @@ async def on_ready():
141
139
def howsign_impl (word : str ):
142
140
spoiler = get_spoiler_text (word )
143
141
word = spoiler if spoiler else word
142
+ title = f"||{ word .upper ()} ||" if spoiler else word .upper ()
144
143
template = HOWSIGN_SPOILER_TEMPLATE if spoiler else HOWSIGN_TEMPLATE
145
- log = (
146
- f"sending spoiler links for: '{ word } '"
147
- if spoiler
148
- else f"sending links for: '{ word } '"
149
- )
150
- logger .info (log )
144
+ logger .info (f"sending links for: '{ word } '" )
151
145
quoted_word = quote_plus (word )
152
146
return {
153
- "content" : template .format (
154
- word_uppercased = word .upper (),
155
- lifeprint = f"https://www.google.com/search?&q=site%3Alifeprint.com+{ quoted_word } " ,
156
- handspeak = f"https://www.google.com/search?&q=site%3Ahandspeak.com+{ quoted_word } " ,
157
- signingsavvy = f"https://www.signingsavvy.com/search/{ quoted_word } " ,
158
- spread_the_sign = f"https://www.spreadthesign.com/en.us/search/?q={ quoted_word } " ,
159
- youglish = f"https://youglish.com/pronounce/{ quoted_word } /signlanguage/asl" ,
147
+ "embed" : discord .Embed (
148
+ title = title ,
149
+ description = template .format (
150
+ word_uppercased = word .upper (),
151
+ lifeprint = f"https://www.google.com/search?&q=site%3Alifeprint.com+{ quoted_word } " ,
152
+ handspeak = f"https://www.google.com/search?&q=site%3Ahandspeak.com+{ quoted_word } " ,
153
+ signingsavvy = f"https://www.signingsavvy.com/search/{ quoted_word } " ,
154
+ spread_the_sign = f"https://www.spreadthesign.com/en.us/search/?q={ quoted_word } " ,
155
+ youglish = f"https://youglish.com/pronounce/{ quoted_word } /signlanguage/asl" ,
156
+ ),
160
157
)
161
158
}
162
159
0 commit comments