Compare commits
1 Commits
4df0b281d6
...
ce55e2eed3
Author | SHA1 | Date | |
---|---|---|---|
ce55e2eed3 |
|
@ -27,11 +27,16 @@ def isup(bot, trigger):
|
|||
return bot.msg("Missing or invalid schema. Check the URL.")
|
||||
|
||||
except requests.exceptions.ConnectionError:
|
||||
return bot.msg("Connection error. Are you sure this is a real website?")
|
||||
return bot.msg("\x0304Connection error\x03. Are you sure this is " + \
|
||||
"a real website?")
|
||||
|
||||
except requests.exceptions.InvalidURL:
|
||||
return bot.msg("Invalid URL.")
|
||||
|
||||
except requests.exceptions.ReadTimeout:
|
||||
return bot.msg("\x0307" + url + "\x03 looks \x0304down\x03 from " + \
|
||||
"here (\x0304Timed out [10s]\x03)")
|
||||
|
||||
except Exception as e:
|
||||
print(e)
|
||||
return bot.msg("Listen buddy. I don't know what you're doing, but " + \
|
||||
|
@ -39,6 +44,6 @@ def isup(bot, trigger):
|
|||
|
||||
try:
|
||||
res.raise_for_status()
|
||||
return bot.msg(url + " appears to be working from here.")
|
||||
return bot.msg("\x0307" + url + "\x03 looks \x0303up\x03 from here.")
|
||||
except requests.exceptions.HTTPError:
|
||||
return bot.msg(url + " looks down from here.")
|
||||
return bot.msg("\x0307" + url + "\x03 looks \x0304down\x03 from here.")
|
||||
|
|
|
@ -106,7 +106,7 @@ def watch(bot, trigger):
|
|||
bot.memory["watcher"][url] = t
|
||||
|
||||
bot.db.execute("INSERT INTO watcher(api_url, name, last_post, time_since)"
|
||||
" VALUES(?,?,?,?,?)", (api_url, name, last_post, time_since))
|
||||
" VALUES(?,?,?,?)", (api_url, name, last_post, time_since))
|
||||
|
||||
bot.msg("[\x0304Watcher\x03] Watching thread: \x0307" + url)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user