{"id":20993638,"url":"https://github.com/zaanposni/discord-masz","last_synced_at":"2026-03-17T14:35:04.648Z","repository":{"id":38309937,"uuid":"285656605","full_name":"zaanposni/discord-masz","owner":"zaanposni","description":"MASZ is a selfhostable highly sophisticated moderation bot for Discord. Includes a web dashboard and a discord bot.","archived":false,"fork":false,"pushed_at":"2024-01-09T16:11:34.000Z","size":15776,"stargazers_count":71,"open_issues_count":13,"forks_count":17,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-07-30T18:06:26.857Z","etag":null,"topics":["automoderation","dashboard","discord","discord-application","discord-bot","discord-bots","discord-masz","discord-moderators","masz","moderation","moderation-bot","moderation-bots","moderation-events","moderation-overview","moderation-team","moderators","selfhost","selfhosted","trolls"],"latest_commit_sha":null,"homepage":"https://discord.gg/5zjpzw6h3S","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zaanposni.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"ko_fi":"zaanposni"}},"created_at":"2020-08-06T19:40:37.000Z","updated_at":"2024-07-03T13:41:50.000Z","dependencies_parsed_at":"2024-01-09T17:28:13.809Z","dependency_job_id":null,"html_url":"https://github.com/zaanposni/discord-masz","commit_stats":null,"previous_names":[],"tags_count":60,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaanposni%2Fdiscord-masz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaanposni%2Fdiscord-masz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaanposni%2Fdiscord-masz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaanposni%2Fdiscord-masz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zaanposni","download_url":"https://codeload.github.com/zaanposni/discord-masz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225309918,"owners_count":17454089,"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":["automoderation","dashboard","discord","discord-application","discord-bot","discord-bots","discord-masz","discord-moderators","masz","moderation","moderation-bot","moderation-bots","moderation-events","moderation-overview","moderation-team","moderators","selfhost","selfhosted","trolls"],"created_at":"2024-11-19T07:15:34.075Z","updated_at":"2025-12-24T08:55:32.181Z","avatar_url":"https://github.com/zaanposni.png","language":"C#","funding_links":["https://ko-fi.com/zaanposni"],"categories":["Bots"],"sub_categories":[],"readme":"# 👮 MASZ\n\n[![https://github.com/users/zaanposni/packages/container/package/masz_backend](https://img.shields.io/badge/using-docker-blue?style=for-the-badge)](https://github.com/users/zaanposni/packages/container/package/masz_backend)\n[![https://discord.gg/5zjpzw6h3S](https://img.shields.io/discord/779262870016884756?logo=discord\u0026style=for-the-badge)](https://discord.gg/5zjpzw6h3S)\n[![SupportedLanguages](https://img.shields.io/badge/translated-8%20languages-brightgreen?style=for-the-badge)](https://github.com/zaanposni/discord-masz/blob/master/translations/supported_languages.json)\n\n⭐ **Infractions and managed (temporary) punishments** - to moderate your server\\\n⭐ **Quicksearch** - to reliably search for any infractions or notes a user has\\\n⭐ **Localization** - timezones and languages are fully customizable\\\n⭐ **Automoderation** - to give trolls no chance\\\n⭐ **Ban appeals and webhook notifications** - to moderate your server transparently\\\n⭐ **A website and a discord bot** - to use MASZ\\\n⭐ **Full API and plugin support** - for custom scripts and automations\n\n## 🤝 Maintainers\n\nThis project is stable to use. However, it is no longer actively maintained by me.\\\n**If you want to become a maintainer**, please contact me via [Mail](mailto:masz@zaanposni.com) or [Discord](https://discord.gg/5zjpzw6h3S).\n\n## 👀 Preview\n\n![dashboard preview](/docs/dashboard.png)\n\n**Previews and examples can be found at:** [https://github.com/zaanposni/discord-masz/tree/master/docs](https://github.com/zaanposni/discord-masz/tree/master/docs#preview)\n\n### 🤝 Support Server\n\nJoin this server to receive update information or get support: [https://discord.gg/5zjpzw6h3S](https://discord.gg/5zjpzw6h3S)\n\n## 🛠 Hosting\n\nYou can **host your own instance of MASZ** by using the instructions below.\\\nIf you have any questions, feel free to contact Zaanposni, or a support member:\n\n- [Discord server](https://discord.gg/5zjpzw6h3S)\n- [Email](mailto:me@zaanposni.com)\n\nNote that MASZ is not hosted publicly. You will have to host your own instance.\\\nFurthermore, only deployments on a linux and windows server are supported. Read below for software requirements.\\\nFree hosting providers like replit or heroku **do not work**. You will have to use a VPS instead.\n\n### TL;DR;\n\n- Create a discord application at [https://discord.com/developers/applications](https://discord.com/developers/applications)\n- Set redirect urls on your discord application [as defined](https://github.com/zaanposni/discord-masz#discord-oauth).\n- Enable **Server Members** and **Message Content Intent** in your bot settings.\n- Use `python3 setup.py` (`python setup.py` on windows) to setup the configuration.\n- Start the application with `docker-compose up -d`.\n- App will be hosted on `127.0.0.1:5565`.\n- Read further for more information on different deployment methods and further steps.\n\n### Discord OAuth\n\nCreate your own OAuth application [here](https://discord.com/developers/applications).\nAlso set the redirect paths in the tab `OAuth2`.\\\nBe sure to set the following (choose localhost or domain depending on your deployment):\n\n![redirect example](/docs/redirects.png)\n![redirect example 2](/docs/redirects2.png)\n\n### Bot Intents\n\nEnable **Server Members** and **Message Content Intent** in your bot settings.\n\n![intents example](/docs/intents.png)\n\n### Slash commands\n\nIf you have added your bot yourself, your bot might be missing the permission to create slashcommands.\\\nUse the following link to authorize your bot to do so `https://discord.com/api/oauth2/authorize?permissions=8\u0026scope=bot%20applications.commands\u0026client_id=yourid`.\\\nBe sure to replace \"yourid\" at the end with your client id.\n\n## ✔️ Docker Setup (Recommended)\n\n[![https://github.com/users/zaanposni/packages/container/package/masz_backend](https://img.shields.io/badge/using-docker-blue?style=for-the-badge)](https://github.com/users/zaanposni/packages/container/package/masz_backend)\n\n### Requirements\n\n- [docker](https://docs.docker.com/engine/install/ubuntu/) \u0026 [docker-compose](https://docs.docker.com/compose/) (`docker-compose -v` \u003e 1.25)\n- [python3](https://www.python.org/) for setup\n\n#### If you want to deploy on a domain\n\n- a (sub)domain to host the application on\n- a reverse proxy on your host\n\n### Instructions\n\n- Download this repository `git clone https://github.com/zaanposni/discord-masz` ([zip link](https://codeload.github.com/zaanposni/discord-masz/zip/master))\n- Use `python3 setup.py` (`python setup.py` on windows) to setup the configuration.\n- Start the application with `docker-compose up -d`.\n- App will be hosted on `127.0.0.1:5565`, if you are hosting the app on a domain, redirect your reverse proxy to this local port!\n\n### Update\n\nTo install a new update of MASZ just use:\n\n```bash\ndocker-compose pull\ndocker-compose up -d\n```\n\n## ↪ After Deployment\n\n### 🐾 First Steps\n\n- You can visit your application at `yourdomain.com` (or `127.0.0.1:5565`). You will see a login screen that will ask you to authenticate yourself using Discord OAuth2.\n- After authorizing your service to use your Discord account you will see your profile picture in the toolbar (this is hosted on `127.0.0.1:8080` when developing).\n- If you are logged in as a siteadmin, you can use the \"register guild\" (+) button to register your guilds and to get started.\n- Based on wanted features and functionalities you might have to grant your bot advanced permissions, read under `Enabling Restricted Features`.\n\n### Request logging and ratelimit\n\nMASZ uses the `X-Forwarded-For` http header for logging and ratelimit.\\\nEnsure that this header is set in your reverse proxy for best experience.\n\n### Enabling Restricted Features\n\n#### ⭐ Unban request feature\n\nIf you want banned users to see their cases, grant your bot the `ban people` permission.\\\nThis way they can see the reason for their ban and comment or send an unban request.\\\nFurthermore, make sure the bot is high enough in the role hierarchy to ban people below him.\n\nAdditionally, if you want to enable unban requests (\"ban appeals\"), prepare questions in the \"appeals\" section of your guild dashboard.\n\n#### ⭐ Punishment feature\n\nIf you want the application to execute punishments like mutes and bans and manage them automatically (like unban after defined time on tempban), grant your bot the following permissions based on your needs:\n\n```md\nManage roles - for muted role | Moderate members - for using discord's timeouts\nKick people\nBan people\n```\n\nFurthermore, make sure the bot is high enough in the role hierarchy to punish people below him.\n\nIf you do not want to use a role to mute members, MASZ will automatically use discord's timeouts if you dont define a muted role.\n\n#### ⭐ Automoderation feature\n\nTo avoid any issue for message deletion or read permissions it is recommended to grant your bot a very high and strong or even the `administrator` role.\n\n#### ⭐ Invite tracking\n\nAllows MASZ to track the invites new members are using. Grant your bot the `manage guild` permission to use this feature.\n\n#### ⭐ Strict permission check\n\nYou can enable strict permissions in your guildconfig. This mode will check your moderators role permissions before creating a modcase.\\\nA moderator can only create a kick or ban modcase if he has the respective permission in discord.\\\nIf you do not enable this mode, moderators can create any modcase.\n\n### 🗃️ Backup\n\nThere are backup example scripts in the `scripts` directory to backup uploaded files and the database.\n\n## 💻 Self Hosting (Development)\n\n### .NET\n\n- If you're using an IDE like Visual Studio, you can copy and paste your `launchSettingsExample.json` file inside `Properties` if your C# solution to `launchSettings.json`, replacing the values to your testing variables. On running the program, it will treat these as environmental variables.\n\n### Svelte\n\nIf you want to develop on the svelte frontend, set the env var `ENABLE_CORS=true` for the backend container.\nTo use the svelte instance, please change the `DEV_MODE` value to their development alternatives in the ``config.ts`` file inside the ``src/`` directory.\nThen use `npm run dev` to get a hotload svelte instance.\n\n### MySQL Errors\n\nEntity Framework implores some new features of MySQL for sake of optimising calls to the database.\\\nAs such, it is recommended you install MySQL 8+ to use this new syntax. Otherwise, you will encounter\na `MySQLException` stating you need to check your MySQL version corresponds correctly with the version in your manual.\n\n### Building Docker Containers\n\nAfter development, you may want to build a docker container to test on! This can be done simply through the following commands:\n\n``docker-compose -f docker-compose-dev.yml up --force-recreate --build``\n\n## 🤖 API scripting\n\nAs a siteadmin you can create a token to authenticate yourself while making API requests.\\\nYou can also use my [python library](https://github.com/zaanposni/masz-api-wrapper) to integrate the MASZ API into your project.\n\n## 🤖 Custom plugins\n\nYou can write custom backend plugins for MASZ using C# [[documentation](https://github.com/zaanposni/discord-masz/blob/master/backend/MASZ/Plugins/readme.md)].\n\n## 🤝 Contribute\n\nContributions are welcome.\\\nYou can find our contributions guidelines [here](CONTRIBUTING.md).\\\nIf you are new to open source, checkout [this tutorial](https://github.com/firstcontributions/first-contributions).\\\nFeel free to get in touch with me via our support server [https://discord.gg/5zjpzw6h3S](https://discord.gg/5zjpzw6h3S).\n\n## 💁🏻 Further Help\n\nFeel free to join our discord at [https://discord.gg/5zjpzw6h3S](https://discord.gg/5zjpzw6h3S) if you have further questions about your dev environment.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaanposni%2Fdiscord-masz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzaanposni%2Fdiscord-masz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaanposni%2Fdiscord-masz/lists"}