2 # tall.bot - a simple Discord Wikipedia bot
9 keywords = ["what is", "What is", "what was", "What was", "what were",
10 "What were", "who is", "Who is", "who was", "Who was",
11 "who were", "Who were", "who are", "Who are"]
13 def wiki_sum(search, sen):
15 output = "From Wikipedia: " + wikipedia.summary(search, sentences=sen)
17 output = "There was an error"
21 def keyword_check(inp):
29 class MyClient(discord.Client):
30 async def on_ready(self):
31 print('Logged in as', self.user)
33 async def on_message(self, message):
34 if message.author == self.user:
37 if keyword_check(message.content):
38 await message.channel.send(wiki_sum(message.content.split()[2:], 2))
41 client.run(sys.argv[1])