From a862f647f45ef48681bed8647b0776b77280df37 Mon Sep 17 00:00:00 2001 From: Swee Date: Sun, 22 Sep 2024 14:11:53 -0700 Subject: [PATCH] Update sweebot.py --- sweebot.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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.")