{"id":24056943,"url":"https://github.com/comicallybad/discord-antiphishinglinks","last_synced_at":"2025-04-23T01:16:57.333Z","repository":{"id":57685846,"uuid":"470442854","full_name":"comicallybad/discord-antiphishinglinks","owner":"comicallybad","description":null,"archived":false,"fork":false,"pushed_at":"2022-11-24T22:36:01.000Z","size":4733,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-23T01:16:46.913Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/comicallybad.png","metadata":{"files":{"readme":"ReadME.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-16T05:20:53.000Z","updated_at":"2023-06-02T20:27:24.000Z","dependencies_parsed_at":"2023-01-22T18:30:42.320Z","dependency_job_id":null,"html_url":"https://github.com/comicallybad/discord-antiphishinglinks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/comicallybad%2Fdiscord-antiphishinglinks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/comicallybad%2Fdiscord-antiphishinglinks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/comicallybad%2Fdiscord-antiphishinglinks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/comicallybad%2Fdiscord-antiphishinglinks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/comicallybad","download_url":"https://codeload.github.com/comicallybad/discord-antiphishinglinks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250349061,"owners_count":21415914,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-09T05:28:06.567Z","updated_at":"2025-04-23T01:16:57.305Z","avatar_url":"https://github.com/comicallybad.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# discord-antiphishinglinks\n\n## Installation:\n\n**Node.js 17.0.0 or newer is required.**\n\n**discord.js 13.0.0 or newer is required.**\n\n```sh-session\nnpm install discord.js@latest\n```\n```sh-session\nnpm install discord-antiphishinglinks@latest\n```\n\n## Usage:\n\n```js\nconst { Client, GatewayIntentBits } = require('discord.js');\nconst client = new Client({ intents: [GatewayIntentBits.Guilds] });\nconst { antiPhishing } = require('discord-antiphishinglinks');\n\nclient.login(\"BOT-TOKEN\");\n\nclient.on('messageCreate', async message =\u003e {\n    //This  is good practice to check\n    if (!message || !message.guild) return;\n    if (!message.member) message.member = await message.guild.members.fetch(message).catch(err =\u003e err);\n\n    antiPhishing(message).then(found =\u003e {\n        //If a phishing link is found\n        if(found){\n            //Optional search for a log channel\n            const logChannel = message.guild.channels.cache.find(c =\u003e c.name.includes(\"mod-logs\"));\n\n            //Delete user's phishing message\n            message.delete().catch(err =\u003e err);     //Catch in case of \"Unknown Message\" error.\n\n            //Embed example with link marked as a spoiler\n            let embed = new MessageEmbed()\n                .setColor(\"#FF0000\")\n                .setTitle(\"Phishing Link Detected\")\n                .setThumbnail(message.author.displayAvatarURL())\n                .setDescription(`Phishing link detected **DO NOT** open this link!`)\n                .addField('Link', `||${found.link}||`)\n                .setFooter({ text: `Phishing link sent by ${message.member.displayName}`, iconURL: message.author.displayAvatarURL() })\n                .setTimestamp();\n\n            //Send channel the Phishing Warning Embed\n            message.channel.send({embeds: [embed]});\n\n            //If log channel is found\n            if (logChannel) {\n                //Add a field with more user information: \n                //      message.author is an @ mention, therefore; clickable for easy banning\n                embed.addField('User', `Link sent by ${message.author} (${message.author.id})`);\n                return logChannel.send({embeds: [embed]});\n            } else return \n        }\n    });\n});\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomicallybad%2Fdiscord-antiphishinglinks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcomicallybad%2Fdiscord-antiphishinglinks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomicallybad%2Fdiscord-antiphishinglinks/lists"}