{"id":27329528,"url":"https://github.com/brainboxdotcc/beholder","last_synced_at":"2025-04-12T12:55:42.404Z","repository":{"id":200140443,"uuid":"704275352","full_name":"brainboxdotcc/beholder","owner":"brainboxdotcc","description":"The Beholder Bot - Block Bad Images on Discord!","archived":false,"fork":false,"pushed_at":"2025-03-04T23:20:35.000Z","size":543,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-05T00:24:12.825Z","etag":null,"topics":["ai","bot","cpp","cpp17","discord","discord-bot","discord-moderation","discord-moderation-bot","dpp","image-classification","image-processing","image-recognition","image-recognition-bot","ocr"],"latest_commit_sha":null,"homepage":"https://dpp.dev/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brainboxdotcc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2023-10-12T23:28:09.000Z","updated_at":"2025-03-04T23:20:39.000Z","dependencies_parsed_at":"2023-12-23T12:14:50.804Z","dependency_job_id":"d53d2125-9dc7-4b30-9fef-d718fdd8a480","html_url":"https://github.com/brainboxdotcc/beholder","commit_stats":null,"previous_names":["brainboxdotcc/yeet","brainboxdotcc/beholder"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brainboxdotcc%2Fbeholder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brainboxdotcc%2Fbeholder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brainboxdotcc%2Fbeholder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brainboxdotcc%2Fbeholder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brainboxdotcc","download_url":"https://codeload.github.com/brainboxdotcc/beholder/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248571865,"owners_count":21126520,"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":["ai","bot","cpp","cpp17","discord","discord-bot","discord-moderation","discord-moderation-bot","dpp","image-classification","image-processing","image-recognition","image-recognition-bot","ocr"],"created_at":"2025-04-12T12:55:41.510Z","updated_at":"2025-04-12T12:55:42.394Z","avatar_url":"https://github.com/brainboxdotcc.png","language":"C++","readme":"![Social](https://beholder.cc/img/social.png)\n\nThis is a bot powered by the [D++ library](https://dpp.dev) which scans images posted on public channels through OCR and AI Image Recognition and uses pattern matching to determine what is in the images. If they match the admin's defined ruleset, it deletes the message and tells the user off with a customisable message.\n\n## Compilation\n\n```bash\nmkdir build\ncd build\ncmake ..\nmake -j\n```\n\n## Configuring the bot\n\nCreate a config.json in the directory above the build directory:\n\n```json\n{\n\t\"token\": \"token goes here\", \n\t\"tunnel_interface\": \"GRE tunnel interface IP\",\n\t\"log\": \"log path goes here\",\n\t\"environment\": \"environment name\",\n\t\"sentry_dsn\": \"sentry dsn\",\n\t\"sentry_sample_rate\": 0.2,\n\t\"ir\": {\n\t\t\"host\": \"image recognition endpoint\",\n\t\t\"path\": \"image recognition endpoint\",\n\t\t\"credentials\": {\n\t\t\t\"username\": \"username\",\n\t\t\t\"password\": \"password\"\n\t\t},\n\t\t\"fields\": [],\n\t\t\"label_runner\": \"resnet-50 endpoint url\",\n\t\t\"label_key\": \"resnet key\"\n\t},\n\t\"database\": {\n\t\t\"host\": \"localhost\",\n\t\t\"username\": \"mysql username\",\n\t\t\"password\": \"mysql password\",\n\t\t\"database\": \"mysql database\",\n\t\t\"port\": 3306\n\t}\n\t,\n\t\"botlists\": {\n\t\t\"top.gg\": {\n\t\t\t\"token\": \"top.gg bot list token\"\n\t\t},\n\t\t\"other compatible bot list\": {\n\t\t\t\"token\": \"their token...\"\n\t\t}\n\t}\n}\n\n```\n\n**Note**: Leave the values under the `ir` key as empty strings. Self-hosting the premium image recognition API is not supported at this time.\n\nImport the base mysql schema:\n\n```bash\nmysql -u \u003cdatabase-user\u003e -p \u003cdatabase-name\u003e \u003c database/schema.sql\nEnter password:\n```\n\nInsert data into database for your guild and patterns\n\n## Software Dependencies\n\n* [D++](https://github.com/brainboxdotcc/dpp) v10.0.28 or later\n* sentry-native\n* libcrypto/libssl\n* libtesseract-dev\n* libleptonica-dev\n* ImageMagick Convert\n* libmysqlclient 8.x\n* g++ 11.4 or later\n* cmake\n* fmtlib\n* spdlog\n* CxxUrl\n* screen\n* [Beholder NSFW Scanning container](https://github.com/brainboxdotcc/beholder-nsfw-server):\n  * Docker\n  * Docker Compose\n  * node.js 20.x\n  * Tensorflow\n  * tfjs-node\n  * express\n\n## Other Dependencies\n\nTo offer premium services, various paid subscription APIs are required. These are configured in the `ir` tag in `config.json` You should also subscribe to an **anti-DDOS tunnel service**, which can be bound to as an interface for making unsafe web requests to fetch image content. Without this, your server's IP is left exposed to the neer-do-wells of Discord. Configure this in `tunnel_interface`.\n\n## Starting the bot\n\n```bash\ncd beholder\nscreen -dmS beholder ./run.sh\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrainboxdotcc%2Fbeholder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrainboxdotcc%2Fbeholder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrainboxdotcc%2Fbeholder/lists"}