Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

FalloutStudios/discord-scam-links

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@falloutstudios/djs-scam-links

Check if string for contains scam domains.

Example

const { Client } = require('discord.js');
const { DiscordScamLinks } = require('@falloutstudios/djs-scam-links');

const client = new Client({
    intents: [
        'Guilds',
        'GuildMessages',
        'MessageContent'
    ]
});

const scamLinks = new DiscordScamLinks();

client.on('ready', async () => {
    await scamLinks.refreshDomains();
});

client.on('messageCreate', async message => {
    if (scamLinks.isMatch(message.content)) await message.delete();
});

client.login('TOKEN');

Domains

By default this package uses discord-phishing-links for the list of malicious discord domains!

Add custom domains

const { DiscordScamLinks } = require('@falloutstudios/djs-scam-links');

const scamLinks = new DiscordScamLinks();

// Add string domain
scamLinks.addDomains('suspicious.com');

// Add multiple domains
scamLinks.addDomains('anothersuspicious.com', 'moresuspicious.com');

// Add from url
scamLinks.fetchDomainsFromUrl('https://yourdomain.com/domains.json'); // Example content ["anothersuspicious.com", "moresuspicious.com"]
scamLinks.fetchDomainsFromUrl('https://yourdomainagain.com/domains.json', { dataParser: data => data.domains }); // Example content { "domains": ["anothersuspicious.com", "moresuspicious.com"] }

About

Detect scam domains in string

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published