Untitled
unknown
plain_text
2 years ago
479 B
8
Indexable
async def on_message(message):
if message.author == client.user:
return
if message.content.startswith('!dictionary'):
word = message.content.split(' ')[1]
definition = dictionary.meaning(word)
if definition:
for key, val in definition.items():
await message.channel.send(f'**{key}**: {", ".join(val)}')
else:
await message.channel.send('Sorry, I could not find a definition for that word.')Editor is loading...
Leave a Comment