2 # tall.bot - a simple Discord Wikipedia bot
10 keywords = ["what is", "What is", "what was", "What was", "what were",
11 "What were", "who is", "Who is", "who was", "Who was",
12 "who were", "Who were", "who are", "Who are"]
14 def wiki_sum(search, sen, pid):
15 search = " ".join(search)
17 logging.info(str(pid) + " | " + search)
18 return "<Wikipedia> " + wikipedia.summary(search,
21 except Exception as e:
22 logging.debug(str(pid) + " | " + search + " | " + str(e))
25 def keyword_check(inp):
33 class TallBot(discord.Client):
34 async def on_ready(self):
35 logging.debug('Logged in as ', self.user)
37 async def on_message(self, message):
38 if message.author == self.user:
41 if keyword_check(message.content):
42 await message.channel.send(wiki_sum(message.content.split()[2:],
46 TallBot().run(sys.argv[1])