{"id":16825970,"url":"https://github.com/macdue/banutil","last_synced_at":"2025-07-05T16:33:56.597Z","repository":{"id":93648812,"uuid":"118634120","full_name":"MacDue/BanUtil","owner":"MacDue","description":"A (almost) stateless moderation bot that can be easily deployed. ","archived":false,"fork":false,"pushed_at":"2018-02-21T17:02:02.000Z","size":4759,"stargazers_count":6,"open_issues_count":1,"forks_count":22,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T01:42:07.628Z","etag":null,"topics":["discord","discord-bot","dueutil","heroku","moderation-bot"],"latest_commit_sha":null,"homepage":null,"language":"Java","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/MacDue.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":"2018-01-23T16:05:00.000Z","updated_at":"2021-02-16T03:54:32.000Z","dependencies_parsed_at":"2023-03-15T21:15:43.191Z","dependency_job_id":null,"html_url":"https://github.com/MacDue/BanUtil","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacDue%2FBanUtil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacDue%2FBanUtil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacDue%2FBanUtil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacDue%2FBanUtil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MacDue","download_url":"https://codeload.github.com/MacDue/BanUtil/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248339287,"owners_count":21087213,"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","dueutil","heroku","moderation-bot"],"created_at":"2024-10-13T11:15:57.190Z","updated_at":"2025-04-11T03:41:52.936Z","avatar_url":"https://github.com/MacDue.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BanUtil\n\n[![Build Status](https://travis-ci.org/MacDue/BanUtil.svg?branch=master)](https://travis-ci.org/MacDue/BanUtil)\n\n###### BanUtil is simple a self hosted Discord bot for helping with moderation.\n\n### About\n\n#### Features\n - Mod log with reasons \u0026 images.\n - Role based permissions.\n - Web status page.\n\n#### How the bot works\n\nOn your server you create ``Moderator``, ``Can kick``, ``Can ban`` roles for your mods and ``Mute``, and ``Warned`` punishment roles.\n\nNone of the roles need to have any special permissions (though you'd probably want the mute role to mute people).\n\nGiving someone the ``Moderator`` role will allow them to mute and warn users, and adding the \"Can kick/ban\" roles will do the obvious.\n\nAll actions will be logged in a channel you choose with reasons (that can contain images).\n\n___\n\n### Setup (Heroku)\n\n[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/MacDue/BanUtil/tree/master)\n\n1. [Create a new bot account.](https://discordapp.com/developers/applications/me)\n2. [Sign up for a free Heroku account.](https://signup.heroku.com)\n3. Click the button above.\n4. Fill in the token and role IDs. \n5. Click ![deploy](https://i.imgur.com/IJX7Hob.png?1)\n6. Heroku will build and deploy the bot in about 30 seconds.\n7. Click ![view](https://i.imgur.com/Bq1bwoR.png)\n\nIf you configured the bot correctly clicking view should take you to a page like:\n![status ok](https://i.imgur.com/jVvPCZA.png)\n\nNote: before the bot is invited to your server the page will say \"ERROR\".\nIf it does not go away after the bot joins your server (and you refresh the page) something is wrong.\n\n##### Heroku free \"sleeping apps\"\n\nYour bot will go to sleep if the status page is not checked in ~30 mins. To wake up your bot just open the page (whatyoucalledtheapp.herokuapp.com).\n\n___\n\n\n### Setup (self hosted)\n\n**Requirements:** Java 8 JDK \u0026 git\n\nBuilding: \n```sh\ngit clone https://github.com/MacDue/BanUtil\ncd BanUtil\n./gradlew stage\n```\nConfig: edit the exports at the start of ``run_local.sh``\n\nYou should end up with something like this:\n\n```sh\nexport TOKEN=\"MzM4Dz0PzIfUofQ.Hw2MKNcMDzs__.0SNsT7dyEn1zrg058NQAUgYxOb5XZ\"\nexport MOD_ROLE_ID=355416210822922241\nexport CAN_BAN_ROLE_ID=355414578974162945\nexport CAN_KICK_ROLE_ID=355414612948025345\nexport WARNING_ROLE_ID=355414676819017729\nexport MUTE_ROLE_ID=355414636700499970\nexport LOG_CHANNEL_ID=323923806223597569\nexport SERVER_ID=148403597464436736\nexport OWNER_ID=132315148487622656\nexport RESTART_COMMAND=\"sh run_local.sh\"\n```\nStarting bot: ``sh run_local.sh``\n\n##### Enable status page\n\nIf you want the status page from the Heroku deploy add the following to the start of your run script:\n```sh\nexport ENABLE_WEB=true\nexport PORT=80\n```\nRestart the bot and you should see the status page on ``localhost`` / your ip.\n\n___\n\n### P.s.\n\nA simple way to get role IDs is to make the role mentionable then type ``\\@Role``. It should show something like ``\u003c@\u0026355471059698319363\u003e`` when after you send the message. The ID is the nunber between `\u003c@\u0026` and `\u003e`. To find other IDs enable developer mode (under settings -\u003e appearance), then copy IDs with the context menu.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacdue%2Fbanutil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmacdue%2Fbanutil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacdue%2Fbanutil/lists"}