diff options
Diffstat (limited to 'modules/haveibeenpwned.py')
| -rw-r--r-- | modules/haveibeenpwned.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/modules/haveibeenpwned.py b/modules/haveibeenpwned.py index 79662913..0a328c3e 100644 --- a/modules/haveibeenpwned.py +++ b/modules/haveibeenpwned.py @@ -1,15 +1,16 @@ -from src import Utils +from src import ModuleManager, Utils URL_HAVEIBEENPWNEDAPI = "https://haveibeenpwned.com/api/v2/breachedaccount/%s" URL_HAVEIBEENPWNED = "https://haveibeenpwned.com/" -class Module(object): - def __init__(self, bot, events, exports): - events.on("received.command.beenpwned").hook(self.beenpwned, - help="Find out if a username, email or similar has appeared " - "in any hacked databases", usage="<username/email>", min_args=1) - +class Module(ModuleManager.BaseModule): + @Utils.hook("received.command.beenpwned", usage="<username/email>", + min_args=1) def beenpwned(self, event): + """ + Find out if a username, email or similar has appeared in any + hacked databases + """ page = Utils.get_url(URL_HAVEIBEENPWNEDAPI % event["args"], json=True, code=True) if page: |
