diff --git a/sweebot.py b/sweebot.py index 25fec71..f792e71 100644 --- a/sweebot.py +++ b/sweebot.py @@ -250,11 +250,14 @@ while True: run-=1 update() else: - if path.isfile(cwd + "/helps/" + " ".join(command[1:])): - output = open(cwd + "/helps/" + " ".join(command[1:])).read() - multiline(output) - else: - irc.send_irc(channel, "Either the command isn't documented yet or it doesn't exist lol") + try: + if path.isfile(cwd + "/helps/" + " ".join(command[1:])): + output = open(cwd + "/helps/" + " ".join(command[1:])).read() + multiline(output, channel) + else: + irc.send_irc(channel, "Either the command isn't documented yet or it doesn't exist lol") + except: + multiline(output, channel) else: irc.send_irc(channel, "tip, ping, whoami, perms, version, figlet, tdfiglet, cowsay, uptime, cc, joke, botsnack. (restart, join, part, shell, config, pull.) Use '$help (command)' for explanation.")