{"id":21888988,"url":"https://github.com/commandserver/antispambot","last_synced_at":"2025-04-15T10:23:42.000Z","repository":{"id":37010991,"uuid":"471116313","full_name":"Commandserver/Antispambot","owner":"Commandserver","description":"A Discord Bot to protect your server from raids, spam, invitations, fake nitro ads and more written in C++","archived":false,"fork":false,"pushed_at":"2024-11-23T19:47:24.000Z","size":28589,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T19:11:52.681Z","etag":null,"topics":["anti-raid","antispam","bot","cpp","discord","discord-bot","discord-client","discordbot","dpp","spam-detection","spam-protection"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Commandserver.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-17T19:30:54.000Z","updated_at":"2024-11-22T17:47:52.000Z","dependencies_parsed_at":"2024-01-14T23:25:51.359Z","dependency_job_id":"e7795728-eb8e-4ab8-9b0b-87efeef14277","html_url":"https://github.com/Commandserver/Antispambot","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Commandserver%2FAntispambot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Commandserver%2FAntispambot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Commandserver%2FAntispambot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Commandserver%2FAntispambot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Commandserver","download_url":"https://codeload.github.com/Commandserver/Antispambot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249049431,"owners_count":21204451,"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":["anti-raid","antispam","bot","cpp","discord","discord-bot","discord-client","discordbot","dpp","spam-detection","spam-protection"],"created_at":"2024-11-28T11:18:24.569Z","updated_at":"2025-04-15T10:23:41.957Z","avatar_url":"https://github.com/Commandserver.png","language":"C++","readme":"# Antispambot\n\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/9804970630774ee6b62a900404df2c04)](https://www.codacy.com/gh/Commandserver/Antispambot/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=Commandserver/Antispambot\u0026amp;utm_campaign=Badge_Grade)\n![Lines of code](https://img.shields.io/tokei/lines/github/Commandserver/Antispambot) \n![GitHub](https://img.shields.io/github/license/Commandserver/Antispambot) \n\n**An efficient Discord Bot to prevent spam** written in C++. Tested on a large discord server and mitigates around 90% of spam. Its well commented and therefor you can easily adapt it according to your needs. Currently, it's designed to only work with one Guild.\n\n## Features\n\nThe following is considered as spam and will be deleted by the bot:\n* discord invitations\n* crossposted messages (repeated messages over too many channels). This also effects fake nitro ads!\n* repeated messages\n* messages with too many mentions\n* bad words (configurable in `bad-words.txt`)\n* messages that contains an url of a blacklisted domain (see `domain-blacklist.txt`)\n* forbidden file extensions like _.exe_ (configurable in `config.json`)\n\nThe bot is using the new Timeout feature of Discord to time out users who spam!\nYou can configure users and roles that are excluded.\n\n🤖 It also detects raids when large amounts of users joined in a shorter time and notifies you.\n\n🕐 All created threads will have a slow-mode of 3 seconds to prevent mass-pings in them.\n\n\u003chr\u003e\n\nThe bot creates the following slash commands:\n\n| Slash command | description                                                                                        |\n|---------------|----------------------------------------------------------------------------------------------------|\n| `/manage`     | To configurate excluded roles and users as well as managing the blacklisted domains and bad words. |\n| `/info`       | Information about the bot                                                                          |\n| `/massban`    | Ban command to easily ban suspicious accounts                                                      |\n| `/masskick`   | kick command to easily kick suspicious accounts                                                    |\n\n## Dependencies\n\n* [cmake](https://cmake.org/) (version 3.16+)\n* [g++](https://gcc.gnu.org) (version 8 or higher)\n\n**Included dependencies (in the `/libs` folder)**\n\n* [DPP](https://github.com/brainboxdotcc/DPP) (version 10.0.21)\n* [spdlog](https://github.com/gabime/spdlog)\n\n## Supported Platforms\n\nI run the bot on Linux (ubuntu). But other UNIX-style platforms should build and run the bot fine.\n\n## Building\n\nCompile instructions for Linux:\n\nGo into the project directory and run the following commands.\n\n```bash\nmkdir build\ncd build\ncmake ..\nmake -j8\n```\n\nReplace the number after -j with a number suitable for your setup, usually the same as the number of cores on your machine.\n\nVisit the [D++ library documentation](https://dpp.dev/) for more details.\n\n## Configuration and Running\n\nRename the `config.json.dist` to `config.json` and configure it. The configuration variables in the file should be self-explanatory.\n\nAll bad words are saved line by line in the `bad-words.txt`.\n\nThe `bypass-config.txt` can be used to exclude users and roles from getting detected by the bot, just save the user- and role IDs line by line in it.\n\nAll forbidden domains are stored in `domain-blacklist.txt`. Used to prevent the sharing of certain websites/urls. You can also add top-level-domains to them.\n\nThe bot creates discord slash commands to manage the above three _.txt_-configs, therefor they're stored in extra files.\n\nThe bot requires the **message content** and **server members** intent to be enabled!\nAdd the bot with the `bot` and `applications.commands` scope to your server!\nThe bot needs at least the following permissions: `VIEW_CHANNEL`, `SEND_MESSAGES`, `MANAGE_MESSAGES`, `MANAGE_THREADS`, `MODERATE_MEMBERS`, `BAN_MEMBERS`, `KICK_MEMBERS`.\n\n\u003chr\u003e\n\nI'd recommend running the bot with systemd, to keep the bot always online.\n\nA basic unit file could look like this:\n\n```unit file (systemd)\n[Unit]\nDescription=Antispam Discord Bot\nAfter=network.target\n\n[Service]\nExecStart=/home/PATH_TO_THE_EXECUTABLE\nType=simple\nRestart=always\n\n[Install]\nWantedBy=multi-user.target\n```\n\n## Support me\n\nBe sure to leave a ⭐️ if you like the project :) Thank you! Be sure to contribute, if you're interested!\n\n## FAQ\n\n**Why C++?**\n\nI had pretty much the same bot in python, but I had problems with the message cache when it ran on a bigger discord server. Weird things happened and in the end i had no _real_ control of the cache, so i moved to C++.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommandserver%2Fantispambot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcommandserver%2Fantispambot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommandserver%2Fantispambot/lists"}