# tall.bot - a simple Discord Wikipedia bot
# Armaan Bhojwani 2020
-import sys
import logging
+import sys
import wikipedia
import discord
def wiki_sum(search, sen, pid):
search = " ".join(search)
-
try:
- output = "<Wikipedia> " + wikipedia.summary(search, sentences=sen)
logging.info(str(pid) + " | " + search)
+ return "<Wikipedia> " + wikipedia.summary(search,
+ sentences=sen,
+ auto_suggest=False)
except Exception as e:
- output = str(e)
- logging.info(str(pid) + " | " + search + " | " + str(e))
-
- return output
+ logging.debug(str(pid) + " | " + search + " | " + str(e))
+ return str(e)
def keyword_check(inp):
x = inp.split()
2,
message.author))
-client = TallBot()
-client.run(sys.argv[1])
+TallBot().run(sys.argv[1])