Module: @sapphire/phisherman
Interfaces
Type Aliases
CheckReturnType
Ƭ CheckReturnType: PhishermanReturnType
& { isScam
: boolean
}
Defined in
Functions
checkDomain
▸ checkDomain(domain
, apiKey?
): Promise
<{ classification
: "unknown"
| "malicious"
| "suspicious"
| "safe"
; isScam
: boolean
; verifiedPhish
: boolean
}>
Checks if a link is detected as a scam or phishing link by phisherman.
Since
1.0.0
Parameters
Name | Type | Default value | Description |
---|---|---|---|
domain | string | undefined | The domain to check. |
apiKey | string | storedApiKey | optionally pass a Phiserman API key for making this request. This will default to storedApiKey, which can be configured through setApiKey. |
Returns
Promise
<{ classification
: "unknown"
| "malicious"
| "suspicious"
| "safe"
; isScam
: boolean
; verifiedPhish
: boolean
}>
Defined in
getDomainInfo
▸ getDomainInfo(domain
, apiKey?
): Promise
<PhishermanInfo
>
Returns information for a domain.
Since
1.1.0
Parameters
Name | Type | Default value | Description |
---|---|---|---|
domain | string | undefined | The domain to get info about. |
apiKey | string | storedApiKey | optionally pass a Phiserman API key for making this request. This will default to storedApiKey, which can be configured through setApiKey. |
Returns
Promise
<PhishermanInfo
>
Defined in
reportCaughtPhish
▸ reportCaughtPhish(domain
, apiKey?
, guildId?
): Promise
<PhishermanReportType
>
Report a caught phish back to phisherman to improve their analytics.
Since
1.1.0
Parameters
Name | Type | Default value | Description |
---|---|---|---|
domain | string | undefined | The domain which was caught. |
apiKey | string | storedApiKey | - |
guildId | string | number | '' | The id of the guild in which the domain was caught. |
Returns
Defined in
reportDomain
▸ reportDomain(domain
, apiKey?
): Promise
<PhishermanReportType
>
Report a domain that is confirmed to be a scam or phishing domain to phisherman, to enhance their API.
Since
1.0.0
Parameters
Name | Type | Default value | Description |
---|---|---|---|
domain | string | undefined | The domain to report. |
apiKey | string | storedApiKey | optionally pass a Phiserman API key for making this request. This will default to storedApiKey, which can be configured through setApiKey. |
Returns
Defined in
setApiKey
▸ setApiKey(key
): Promise
<void
>
Set the phisherman's API key.
Since
1.0.0
Parameters
Name | Type | Description |
---|---|---|
key | string | The API key to access the phisherman API and cache within the code of the wrapper. |
Returns
Promise
<void
>