{"id":24310333,"url":"https://github.com/theramann/discord-censor","last_synced_at":"2025-09-26T15:31:35.681Z","repository":{"id":52949493,"uuid":"334156057","full_name":"TheRamann/Discord-Censor","owner":"TheRamann","description":"Use this npm package to censor member's messages and keep your discord server friendly for all ages","archived":false,"fork":false,"pushed_at":"2021-04-12T17:50:38.000Z","size":60,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-16T16:25:49.367Z","etag":null,"topics":["bot","censor","censorify","discord","family","friendly","members","node","nodejs","npm","npm-package","npmjs","server"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/discord-censor","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/TheRamann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-29T13:37:50.000Z","updated_at":"2021-12-22T15:49:26.000Z","dependencies_parsed_at":"2022-09-07T14:31:42.416Z","dependency_job_id":null,"html_url":"https://github.com/TheRamann/Discord-Censor","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/TheRamann%2FDiscord-Censor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheRamann%2FDiscord-Censor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheRamann%2FDiscord-Censor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheRamann%2FDiscord-Censor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheRamann","download_url":"https://codeload.github.com/TheRamann/Discord-Censor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234319577,"owners_count":18813552,"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":["bot","censor","censorify","discord","family","friendly","members","node","nodejs","npm","npm-package","npmjs","server"],"created_at":"2025-01-17T06:11:22.239Z","updated_at":"2025-09-26T15:31:35.382Z","avatar_url":"https://github.com/TheRamann.png","language":"JavaScript","funding_links":["https://www.buymeacoffee.com/TheRamann"],"categories":[],"sub_categories":[],"readme":"\u003c!-- [![Build Status](https://travis-ci.org/TheRamann/discord-censor.svg?branch=main)](https://travis-ci.org/TheRamann/discord-censor)\n[![dependencies Status](https://david-dm.org/TheRamann/discord-censor/status.svg)](https://david-dm.org/TheRamann/discord-censor)\n[![npm version](https://img.shields.io/npm/v/discord-censor.svg)](https://www.npmjs.com/package/discord-censor)\n[![npm downloads](https://img.shields.io/npm/dt/discord-censor.svg)](https://www.npmjs.com/package/discord-censor)\n[![GitHub commit activity](https://img.shields.io/github/commit-activity/y/TheRamann/discord-censor.svg)](https://github.com/TheRamann/discord-censor)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/02438a0c7e1148c486fdc822d79b1f3d)](https://www.codacy.com/app/TheRamann/discord-censor) --\u003e\n\n# Discord-Censor\n\nPeople curse too much in your discord server? \u003cbr\u003e\nUse this npm package to censor their messages and keep your discord server friendly for all ages (unless you wanted to ....)\n# Installation \u003cimg src=\"https://cdn.discordapp.com/emojis/316264057659326464.png?v=1\" alt = \"🖥\" width=\"35px\"\u003e\n\u003cb\u003e\u003ca href = \"https://www.npmjs.com/package/discord-censor\"\u003e npm: \u003c/a\u003e\u003cb\u003e \n\u003cp\u003e\n\u003ccode\u003e npm i discord-censor \u003c/code\u003e\n    \u003cp\u003e\u003cb\u003e\u003ca href = \"https://classic.yarnpkg.com/en/package/discord-censor\"\u003e yarn: \u003c/a\u003e\u003c/p\u003e\n        \u003ccode\u003eyarn add discord-censor \u003c/code\u003e\n\n# Features \u003cimg src = \"https://cdn.discordapp.com/emojis/816591259770552330.gif?v=1\" alt = \"😌\" width = \"35px\"\u003e\n\nThe package has total 3 features (just click on any of them to know more) \u003cbr\u003e\n\n\u003ca href = \"https://www.npmjs.com/package/discord-censor#check-\"\u003e\u003cimg src=\"https://cdn.discordapp.com/emojis/762224193793818625.png?v=1\" alt = \"💜\" width=\"20px\"\u003e \u0026nbsp; A function to check for those words in messages (check) \u003c/a\u003e \u003cbr\u003e\n\u003ca href = \"https://www.npmjs.com/package/discord-censor#censor-\"\u003e\n\u003cimg src=\"https://cdn.discordapp.com/emojis/762224193793818625.png?v=1\" alt = \"💜\" width=\"20px\"\u003e \u0026nbsp; A function to replace bad words from messages (censor)\u003cbr\u003e\u003c/a\u003e\n\u003ca href = \"https://www.npmjs.com/package/discord-censor#badwords-array-\"\u003e\u003cimg src=\"https://cdn.discordapp.com/emojis/762224193793818625.png?v=1\" alt = \"💜\" width=\"20px\"\u003e \u0026nbsp; An array for bad words (badwords)\u003cbr\u003e \u003c/a\u003e\n\n\u003ca href = \"https://www.npmjs.com/package/discord-censor#usage-in-discordjs-\"\u003eThis package is tailored to be used with discord.js \u003c/a\u003e\n\n# Usage \u003cimg src=\"https://cdn.discordapp.com/emojis/757399420319825950.png?v=1\" alt = \"✏\" width=\"35px\"\u003e\n\n## Check \u003cimg src = \"https://cdn.discordapp.com/emojis/779715156610383892.gif?v=1\" width = 22px\u003e\n\nIt is a very handy function and returns value as true or false \u003cbr\u003e\nTo understand it better, see the code example below \u003cbr\u003e\n\n```js\nconst censor = require('discord-censor');\n\nconst CurseOrNot = censor.check(\"Is it a curse?\")\nconsole.log(CurseOrNot) //Prints False\n```\n\n```js\nconst censor = require('discord-censor');\n\nconst CurseOrNot = censor.check(\"Is it a fuckin curse?\")\nconsole.log(CurseOrNot) //Prints true\n```\n\n## Censor \u003cimg src = \"https://cdn.discordapp.com/emojis/708868674953543691.gif?v=1\" width = \"27px\"\u003e\n\nThis function will check for curses and replaces them by itself \u003cbr\u003e\nIt has two parameters \u003cbr\u003e\n```js\nconst censor = require('discord-censor');\n\ncensor.censor('The string you want to censor', 'censored word will be replaced by this (This parameter is optional)')\n```\nFor more information, let's see the example code below \u003cbr\u003e\n```js\nconst censor = require('discord-censor');\n\nconst censored = censor.censor('I am fuckin cursing right now')\nconsole.log(censored) //prints \"I am f***in cursing right now\"\n```\n\nOr if you want to completely remove the word, you can use 2nd parameter of this function\n\n```js\nconst censor = require('discord-censor');\n\nconst censored = censor.censor('I am fuckin cursing right now', '**curse**')\nconsole.log(censored) //prints \"I am **curse** cursing right now\"\n```\n\n## Badwords (array) \u003cimg src = \"https://cdn.discordapp.com/emojis/722735532823543848.gif?v=1\" width = \"26px\"\u003e\nYou might want to interact with the badwords array to change it's content if needed. \u003cbr\u003e\nBy default, it has 500 about bad words stored in it \u003cbr\u003e\nTo interact with the array, see the code example below \u003cbr\u003e\n```js\nconst censor = require('discord-censor');\n\nconsole.log(censor.badwords) //prints all the badwords in the array\n\nconst index = censor.badwords.indexOf('Word'); // Replace word with any word you would like to remove from array\ncensor.badwords.splice(index, 1); //Removes 'Word' from array\n```\n\n# Usage in Discord.Js \u003cimg src=\"https://discord.js.org/static/logo-square.png\" alt = \"✏\" width=\"35px\"\u003e\n\nJust combine the codes above and use the module in your discord bot. \u003cbr\u003e\nFor more information, let's see the example code below \u003cbr\u003e\n```js\nconst censor = require('discord-censor');\n\nconst Discord = require('discord.js');\nconst client = new Discord.Client();\n\nclient.once('ready', () =\u003e {\n\tconsole.log('Ready!');\n});\nclient.on('message', message =\u003e {\n    if(censor.check(message.content) == true){\t\t\t\t      //Check if message has curses or not\n        const censored = censor.censor(message.content)   \t             //Censor the message if they have curses\n        message.channel.send(`${message.author.username} said ${censored}`) //Send the censored version of message\n        message.delete()\t\t\t\t\t\t   //Delete the original of message version which has curses\n    }                           \t\t\t\t\t  //That's all you have to do to censor messages in discord 💜\n});\n\nclient.login('your-token-goes-here');\n```\n\n\n# Like the package? \u003cimg src=\"https://cdn.discordapp.com/emojis/599598716521021441.gif?v=1\" alt = \"✏\" width=\"35px\"\u003e\n\u003ca href = \"https://www.buymeacoffee.com/TheRamann\"\u003e\nSupport the creator here\n\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheramann%2Fdiscord-censor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheramann%2Fdiscord-censor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheramann%2Fdiscord-censor/lists"}