{"id":17696300,"url":"https://github.com/erisa/cliptok","last_synced_at":"2025-10-04T19:13:42.344Z","repository":{"id":36967394,"uuid":"285445955","full_name":"Erisa/Cliptok","owner":"Erisa","description":"Moderation Discord bot for Microsoft Community.","archived":false,"fork":false,"pushed_at":"2025-04-06T01:33:08.000Z","size":1981,"stargazers_count":63,"open_issues_count":24,"forks_count":27,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-06T02:27:25.947Z","etag":null,"topics":["discord","discord-bot","docker","dotnet","microsoft","microsoft-community","moderation-bot","moderation-discord-bot"],"latest_commit_sha":null,"homepage":"https://msft.chat/about/bots.html#cliptok","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/Erisa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","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},"funding":{"github":"Erisa"}},"created_at":"2020-08-06T01:45:22.000Z","updated_at":"2025-04-06T01:33:12.000Z","dependencies_parsed_at":"2024-01-24T00:31:34.031Z","dependency_job_id":"abd8b636-1e06-4d7e-a40a-0a567eb266a0","html_url":"https://github.com/Erisa/Cliptok","commit_stats":{"total_commits":1532,"total_committers":27,"mean_commits":56.74074074074074,"dds":0.4543080939947781,"last_synced_commit":"a7af0322174578dc35ff256721b68244ea15eb91"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erisa%2FCliptok","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erisa%2FCliptok/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erisa%2FCliptok/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erisa%2FCliptok/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Erisa","download_url":"https://codeload.github.com/Erisa/Cliptok/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247430963,"owners_count":20937875,"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":["discord","discord-bot","docker","dotnet","microsoft","microsoft-community","moderation-bot","moderation-discord-bot"],"created_at":"2024-10-24T14:43:52.465Z","updated_at":"2025-10-04T19:13:42.317Z","avatar_url":"https://github.com/Erisa.png","language":"C#","funding_links":["https://github.com/sponsors/Erisa"],"categories":[],"sub_categories":[],"readme":"﻿# Cliptok - Opinionated moderation Discord bot\n\n## About\nThis bot is a Discord moderation bot, it was originally designed for the [Microsoft Community](https://msft.chat/) but its use has since expanded to other servers.  \n\nThe bot is only designed to run in a single server at a time, and is difficult to adjust. A lot is assumed about the environment and you will encounter problems along the way.\nWhile some efforts have been made to not actively break other instances with different configs, modularity and portability is not the goal of this project. You are on your own if you attempt to host this bot for your own purposes. (Good luck though, I hope it works out!)\n\nGitHub Issues will generally only be accepted if they are reproducible in a standard and supported environment, please do not report issues that arise as a result of misconfiguring the bot.\n\n## Configuration\n\nCopy `.env-example` to `.env` and edit in the token for your Discord bot. If you require a different prefix, that can be done in the same file.\n\nTo use the bot outside of it's intended environments, you will need to edit the configuration file more thoroughly, including all of the role IDs and the server ID. It is vital that every config value is present and valid.\n\n## Limitations\nCurrently the bot will only work with one server. This choice was made because the bot was specifically created for a single server at a time and will never be made publicly available. If you are looking to host a bot for multiple servers, this bot is not for you.\n\nA lot of the configuration (Role IDs, emoji IDs, etc.) are in the `config.json` file and cannot be edited at runtime. This means the bot will have to be relaunched for changes to those settings to take effect. This may be improved in the future, however it is not a high priority.\n\n## Usage\nThere are three methods of launching this bot:\n- (Recommended) Through [Docker](https://www.docker.com/).\n- As a standalone application.\n- From Visual Studio, aka development/debug mode.\n\nIf you are not familiar with deploying .NET (Core) and Redis applications, it is recommended to use the Docker method as dependencies are automatically handled for you without polluting your main system, and the setup can be handled with a few simple commands.\n\n### Setup - Docker\nFirst you'll want to install Docker. On a Debian or Ubuntu-based Linux distribution this should be as simple as `sudo apt-get install docker.io docker-compose`.\n\nThen:\n1. Clone this repository and `cd` into the directory.\n2. Copy `.env-example` to `.env` and add the bot token.\n3. Uncomment lines 21-23 in `docker-compose.yml` and edit the `config.json` to fit your needs.\n4. Run the bot in the background: `docker-compose up -d`\n\nThat's it! If you ever need to see the logs, `cd` back into the directory and run `docker-compose logs`.\n\nIf you want to make a backup of the bot's data, that will be inside the `data` folder, though may be owned by root due to Docker limitations. It's up to the user hosting the bot to maintain their own backups (Or lack thereof).  \nThe author(s) of the bot accept(s) no responsibility for lost data due to negligence.\n\nTo update the bot in the future, `git pull` the repository and then pull and restart the containers:\n- `git pull \u0026\u0026 docker-compose pull \u0026\u0026 docker-compose up -d`\n\n### Setup - Standalone\nIf you want to run the bot as a standalone application rather than a Docker container, you'll need to install the dependencies manually:\n- If running on Windows, Windows 10 or higher is required.\n- .NET SDK 8.0, instructions can be found on the [Microsoft website](https://dotnet.microsoft.com/download).\n- Redis server, on Debian or Ubuntu-based Linux distributions this should be `sudo apt-get install redis-server`\n    - It may be in your best interests to configure Redis to use AOF persistence. This will dramatically decrease the risk of losing data due to power failure or similar issues. You can find more information about that on the [Redis website](https://redis.io/topics/persistence).\n    - If running on Windows, [tporadowski/redis](https://github.com/tporadowski/redis) is preferred over WSL or other methods of running Redis.\n        - Do **not** use `microsoftarchive/redis`.\n        - If using WSL, you may need to run `sudo service redis-server start` or `redis-server` manually.\n\nOnce you have everything installed:\n1. Clone this repository and `cd` into the directory.\n2. Set the `CLIPTOK_TOKEN` environment variable to your bots token.\n3. Edit the `config.json` to fit your needs.\n4. Compile the bot for production: `dotnet build -c Release`.\n5. Run the bot: `dotnet run -c Release`\n\nIf you go with this method you will have to fork the bot to the background yourself, through the use of a process manager like `pm2` or a systemd service.\n\n### Setup - Development\nIf you want to develop and make changes to the bot, it's recommended to use the following:\n- First read [our contribution guidelines](CONTRIBUTING.md) if you intend to submit changes back to the repository.\n- You need Windows 10 or higher.\n- You will need .NET SDK 9.0, instructions can be found on the [Microsoft website](https://dotnet.microsoft.com/download).\n- [Visual Studio 2022](https://visualstudio.microsoft.com/vs/), with `.NET desktop development` selected on the installer. \n    - Visual Studio 2019 is untested and no longer preferred.\n    - Make sure you are on the latest version.\n- Redis. It is recommended to install [tporadowski/redis](https://github.com/tporadowski/redis).\n    - Simply download the latest .msi and run it. Adding the Windows Firewall exception is not required.\n- [Git for Windows](https://gitforwindows.org/)\n- A Discord server for testing, with all the roles and channels required for bot functionality.\n\nAlternate setups with Linux/macOS and IDEs like Rider/Visual Studio Code are possible but instructions will not be provided here.\n\nOnce you have everything installed:\n1. Create a new Discord application and bot with all intents enabled, set `CLIPTOK_TOKEN` Windows environment variable to the bots token.\n2. Clone the repository (or your fork of it) to a folder.\n3. Open the `Cliptok.sln` within, making sure to use Visual Studio 2022.\n4. Copy `config.json` to `config.dev.json` and make changes for your testing server.\n    - This is the most difficult part by far. Please try to replicate the required roles/channels/etc as closely as possible.\n5. Edit, run, debug, etc.\n\nIf you have a change to make that follows the contribution guidelines, send a Pull Request.\n\n## Credits\n\n### 🖥️ Developers\n- [Erisa](https://github.com/Erisa)\n- [FloatingMilkshake](https://github.com/FloatingMilkshake)\n\n### ⚙️ Code contributors\n- [TorchGM](https://github.com/TorchGM)\n\n### 💗 Significant sponsors\n- [FloatingMilkshake](https://github.com/FloatingMilkshake)\n\n### 🙏Special thanks\n- [TorchGM](https://github.com/TorchGM) for initial testing and providing core design feedback. Seriously, thank you Torch.\n- [PrincessRavy](https://github.com/PrincessRavy) for providing an API previously used by Cliptok.\n- All of my [GitHub Sponsors](https://github.com/sponsors/Erisa) 💝\n- The developers of [DSharpPlus](https://github.com/DSharpPlus/DSharpPlus), without their library none of this would  be possible.\n- The excellent moderation team over at [Microsoft Community](https://msft.chat/), and all of its wonderful members.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferisa%2Fcliptok","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferisa%2Fcliptok","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferisa%2Fcliptok/lists"}