Skip to main content

Module: @sapphire/phisherman

Interfaces

Type Aliases

CheckReturnType

Ƭ CheckReturnType: PhishermanReturnType & { isScam: boolean }

Defined in

lib/PhishermanTypes.ts:10

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.

Parameters

NameTypeDefault valueDescription
domainstringundefinedThe domain to check.
apiKeystringstoredApiKeyoptionally 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 }>

Since

1.0.0

Defined in

lib/Phisherman.ts:20


getDomainInfo

getDomainInfo(domain, apiKey?): Promise<PhishermanInfo>

Returns information for a domain.

Parameters

NameTypeDefault valueDescription
domainstringundefinedThe domain to get info about.
apiKeystringstoredApiKeyoptionally pass a Phiserman API key for making this request. This will default to storedApiKey, which can be configured through setApiKey.

Returns

Promise<PhishermanInfo>

Since

1.1.0

Defined in

lib/Phisherman.ts:71


reportCaughtPhish

reportCaughtPhish(domain, apiKey?, guildId?): Promise<PhishermanReportType>

Report a caught phish back to phisherman to improve their analytics.

Parameters

NameTypeDefault valueDescription
domainstringundefinedThe domain which was caught.
apiKeystringstoredApiKey-
guildIdstring | number''The id of the guild in which the domain was caught.

Returns

Promise<PhishermanReportType>

Since

1.1.0

Defined in

lib/Phisherman.ts:94


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.

Parameters

NameTypeDefault valueDescription
domainstringundefinedThe domain to report.
apiKeystringstoredApiKeyoptionally pass a Phiserman API key for making this request. This will default to storedApiKey, which can be configured through setApiKey.

Returns

Promise<PhishermanReportType>

Since

1.0.0

Defined in

lib/Phisherman.ts:46


setApiKey

setApiKey(key): Promise<void>

Set the phisherman's API key.

Parameters

NameTypeDescription
keystringThe API key to access the phisherman API and cache within the code of the wrapper.

Returns

Promise<void>

Since

1.0.0

Defined in

lib/Phisherman.ts:117