Skip to content

Commit 6f046ce

Browse files
author
Foxlet
committed
Better.
1 parent c906797 commit 6f046ce

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

plugins/issafe.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ def load_api(bot):
2727
@hook.command()
2828
def issafe(text):
2929
"""<website> -- Checks the website against Google's Safe Browsing List."""
30-
if bool(urlparse(text).scheme) == False:
31-
return "Check your URL (it should be a complete url)."
30+
if urlparse(text).scheme not in ['https', 'http']:
31+
return "Check your URL (it should be a complete URI)."
3232

3333
parsed = requests.get(API_SB, params={"url": text, "client": "cloudbot", "key": dev_key, "pver": "3.1", "appver": str(cloudbot.__version__)})
3434

0 commit comments

Comments
 (0)