async def synonym(message: discord.Message, phrase: Annotate.CleanContent): phrase = phrase.lower() if phrase not in synonyms: matches = get_close_matches(phrase, synonyms.keys(), n=5, cutoff=0.6) await client.say( message, "Found no synonym for {}. Did you mean {}".format( phrase, ", ".join("`" + match + "`" for match in matches))) return await client.say(message, ", ".join(s.strip(" \n") for s in synonyms[phrase]))
async def getTagged(message: discord.Message, text: Annotate.CleanContent): global tagName retv = "" listv = [] i = 0 for item in tagName: if text.lower() == item[1].lower(): listv.append(item[0]) for item in listv: retv += item if i + 1 is not len(listv): retv += ", " i += 1 if retv is "": return await client.say(message, "Tagged " + text + ": " + retv)