I've found a code to make the bot look for important words on wikipedia but the problem is that if I put in in the code all the other commands stops working so i wanted to know what to do
@bot.event
async def on_message(message):
words = message.content.split()
if words[0].lower() == ".define":
important_words = words[1:]
try:
await bot.send_message(message.channel, wiki_summary(important_words))
except wikipedia.exceptions.DisambiguationError as e:
await bot.send_message(message.channel, e)
I've thought of putting it to a @bot.command but don't really know how to modify it to get it to work and another problem was that in only takes up one word so if I want to look for 'city block' it would only take block and make it a disambiguation error Thanks in advance for the help !