{"id":16461618,"url":"https://github.com/jeremynoesen/bonebot","last_synced_at":"2025-06-27T00:07:40.171Z","repository":{"id":45194050,"uuid":"289599889","full_name":"jeremynoesen/BoneBot","owner":"jeremynoesen","description":"A self-hosted, modular Discord bot that adds more life to a Discord server","archived":false,"fork":false,"pushed_at":"2024-04-25T22:40:07.000Z","size":22039,"stargazers_count":7,"open_issues_count":9,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T18:09:40.216Z","etag":null,"topics":["bot","configurable","discord","discord-bot","discord-server","docker","docker-compose","dockerfile","gradle","jda","kotlin","meme-generator","memes","modular","random","self-hosted","utility"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jeremynoesen.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},"funding":{"github":"jeremynoesen","ko_fi":"jeremynoesen","custom":"paypal.me/jeremynoesen"}},"created_at":"2020-08-23T02:13:49.000Z","updated_at":"2025-03-30T17:20:14.000Z","dependencies_parsed_at":"2024-04-26T00:05:16.752Z","dependency_job_id":"dfd10331-ca0e-43a6-b2ce-8e46b101185d","html_url":"https://github.com/jeremynoesen/BoneBot","commit_stats":null,"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"purl":"pkg:github/jeremynoesen/BoneBot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeremynoesen%2FBoneBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeremynoesen%2FBoneBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeremynoesen%2FBoneBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeremynoesen%2FBoneBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeremynoesen","download_url":"https://codeload.github.com/jeremynoesen/BoneBot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeremynoesen%2FBoneBot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262164305,"owners_count":23268781,"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":["bot","configurable","discord","discord-bot","discord-server","docker","docker-compose","dockerfile","gradle","jda","kotlin","meme-generator","memes","modular","random","self-hosted","utility"],"created_at":"2024-10-11T11:08:51.214Z","updated_at":"2025-06-27T00:07:40.145Z","avatar_url":"https://github.com/jeremynoesen.png","language":"Kotlin","funding_links":["https://github.com/sponsors/jeremynoesen","https://ko-fi.com/jeremynoesen","paypal.me/jeremynoesen"],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"img/Logo.svg\" alt=\"Logo\" title=\"Logo\" align=\"right\" width=\"72\" height=\"72\" /\u003e\n\n# BoneBot\n\n## About\n\nBoneBot is a self-hosted, modular Discord bot that can respond and react to messages, add custom commands, send random\nfiles and quotes, and generate memes on demand to add more life to a Discord server.\n\n## Purpose\n\nBoneBot was originally written as a meme-generating Discord bot for the ISUCF'V'MB Trombone and Bass Trombone Discord\nserver. The bot also has functionality to respond and react to messages and commands. This is utilized as a way to add\nhelpful commands to the server to show links for online folders and band information.\n\n## Usage\n\n### Meme Generator\n\nThe meme generator will generate a meme with top and bottom text in Impact font.\n\n##### Command\n\n- `bbmeme`\n- `bbmeme \u003cimage\u003e \u003ctop text\u003e \\n \u003cbottom text\u003e` (Can also press shift+enter instead of `\\n`)\n\n##### Image input\n\n- Image (PNG, JPG)\n- Image link (PNG, JPG)\n- User ping (Grabs their avatar)\n- Image from an embed (PNG, JPG)\n- Any of the above from a reply\n    - Note: main message input will override reply input\n- Random image (If properly configured and no image is provided)\n\n##### Text input\n\n- Text in your message\n- Text in a reply (If no image is in the reply)\n    - Note: main message input will override reply input\n- Random text (If properly configured and no text is provided)\n\nIf you make a mistake in typing the command, or wish to generate another meme with similar inputs, you can edit the\nmessage to fix it without needing to send another message.\n\n### Files\n\nThe file module will send a random file from `resources/files`. This can be an image, video, text file, audio file, etc.\nA specific file can also be sent from the `resources/files` folder\n\n##### Command\n\n- `bbfile`\n- `bbfile \u003cpath\u003e`\n\n##### File input\n\n- Only works for files in `resources/files`\n- If not specified, a random file will be sent.\n    - Specifying a sub-directory for the path will grab a random file from within that directory.\n\n### Quotes\n\nThe quote module will send a random quote from a file.\n\n##### Command\n\n`bbquote`\n\n### Responder\n\nThe responder will respond to a message with another when a trigger phrase is sent in a message or an edit. It can\nappear like it is typing the message itself!\n\n### Reactor\n\nThe reactor will react to a message with an emote when a trigger phrase is sent in a message or an edit.\n\n### Commands\n\nBoneBot allows for custom commands to be made to provide text and image responses and run shell commands. Their usage is\npretty simple - a command called `test` would be used by typing `bbtest`. If you make a mistake in typing a command, you\ncan edit the message to fix it without needing to send another message. This module can provide simple ping-pong style\ncommands, or more complex commands as needed. Some fantastic examples of custom commands can be\nfound [here](https://github.com/diademiemi/BoneBot-Scripts).\n\n### Statuses\n\nBoneBot can have various randomized statuses shown in Discord that change over time.\n\n### Welcomer\n\nThe welcomer will send a private message to new users who join to welcome them to the server. This can be used to show\nserver rules and an explanation of how to get started.\n\n## Requirements\n\nAny version of Windows, macOS, or Linux that can run Java 11 or later.\n\n## Building\n\n1. Clone or download this repository.\n2. Run `./gradlew shadowJar` in the directory of the project.\n3. `/build/libs/BoneBot.jar` should have been generated.\n\nYou can also grab `BoneBot.jar` from the latest releases.\n\n## Installation\n\n### Manual\n\nPlace `BoneBot.jar` where you would like it to be installed.\n\n### Systemd\n\n1. Place `BoneBot.jar` where you would like it to be installed.\n2. Create the following `bonebot.service` file in `/etc/systemd/system/`, making sure to change the `WorkingDirectory`\n   and `ExecStart`, as well as the `User`:\n\n```ini\n[Unit]\nDescription=Service to start BoneBot\nAfter=network-online.target\n\n[Service]\nWorkingDirectory=/path/to/BoneBot-folder\nExecStart=/usr/bin/java -jar /path/to/BoneBot.jar\nUser=set_user_here\nRestart=always\n\n[Install]\nWantedBy=multi-user.target\n```\n\n### Docker\n\n1. Create the following `Dockerfile` wherever you would like:\n\n```Dockerfile\nFROM ubuntu:20.04 as runtime\nENV DEBIAN_FRONTEND=noninteractive\n\nRUN apt update\nRUN apt install default-jre-headless wget locales -y\n\nWORKDIR /app\n\nRUN wget https://github.com/jeremynoesen/BoneBot/releases/download/1.7.2/BoneBot.jar\n\nRUN locale-gen en_US.UTF-8\nENV LANG en_US.UTF-8\nENV LANGUAGE en_US:en\nENV LC_ALL en_US.UTF-8\n\nENTRYPOINT [\"java\", \"-jar\", \"BoneBot.jar\"]\n```\n\n2. Create the following `docker-compose.yml` wherever you would like, making sure to change the `context` to the path of\n   the directory containing the `Dockerfile`, and `volumes` to wherever you would like the volume to be stored:\n\n```yaml\nversion: '3'\nservices:\n  bonebot:\n    container_name: bonebot\n    build:\n      context: /path/to/dir/containing/Dockerfile/\n    restart: unless-stopped\n    network_mode: host\n    volumes:\n      - /path/to/volume:/app/resources\n```\n\n## Bot Application\n\nYou must create a Discord Application before you continue. This creates the bot user that will be used to run the bot.\n\n1. Head over to the [Discord Developer Portal](https://discord.com/developers/applications) and create an application.\n2. Add a bot to the application in the \"Bot\" tab.\n3. Give the bot the following intents:\n    - Server Members Intent\n    - Message Content Intent\n4. Copy the bot token from this page. You will need it later.\n5. Invite the bot using this link, replacing `CLIENT_ID` with the application ID from the \"General Information\"\n   tab: https://discord.com/api/oauth2/authorize?client_id=CLIENT_ID\u0026permissions=379968\u0026scope=bot\n6. Give the bot the following user/role permissions:\n    - View Channels\n    - Send Messages\n    - Embed Links\n    - Attach Files\n    - Add Reactions\n    - Use External Emoji\n    - Read Message History\n\n## Running\n\nAll methods of running for the first time will generate all necessary configuration files and folders, but will fail to\nstart the bot. You will need to set `bot-token` in `resources/config.txt` to the token you copied earlier for the bot to\nstart.\n\n### Manual\n\nRun `cd /path/to/BoneBot-folder \u0026\u0026 java -jar BoneBot.jar` to start the bot.\n\n### Systemd\n\nRun `sudo systemctl enable bonebot \u0026\u0026 sudo systemctl start bonebot` to start the service and allow it to start on boot.\n\n### Docker\n\nRun `docker compose up -d` in the directory of `docker-compose.yml` to start the container.\n\n## Configuration\n\n**After changing any of text configurations, save the file and restart the bot.**\n\n### Placeholders\n\nUse these placeholders in most configurations. Places they are disallowed will be specified per module. Module-specific\nplaceholders will also be specified per module.\n\n- `$AUTHORMENTION$` - Place a mention of the author in the message.\n- `$AUTHORDISPLAYNAME$` - Place the author's display name in the message.\n- `$AUTHORUSERNAME$` - Place the author's username in the message.\n- `$BOTMENTION$` - Place a mention of the bot in the message.\n- `$BOTDISPLAYNAME$` - Place the bot's display name in the message.\n- `$BOTUSERNAME$` - Place the bot's username in the message.\n- `$CHANNELMENTION$` - Place a mention of the channel in the message.\n- `$CHANNELNAME$` - Place the channel's name in the message.\n- `$GUILD$` - Place the guild's name in the message.\n- `$REPLY$` - Send the message as a reply to the author.\n- `\\n` - Place a new line character in the message.\n\n### Meme Generator\n\n- Images for the randomizer are to be placed in the `resources/memeimages` folder. They must be PNG or JPG format.\n- Texts for the randomizer are to be placed in `resources/memetexts.txt`.\n    - Each separate line denotes a separate text.\n    - The format is `\u003ctop text\u003e \\n \u003cbottom text\u003e`.\n- Text input can use all placeholders except for `$REPLY$`.\n- To set the size of generates memes, set `memes-size` in the main configuration to any number. This limits the larger\n  dimension to this value, and scales the other dimension accordingly. Set it to `0` to use the image's original\n  dimensions with no scaling.\n- To set the font size of text, set `memes-font-scale` in the main configuration. It defaults to `1.0`.\n- To set a cool down for the generator, set `memes-cooldown` in the main configuration to any whole number in seconds.\n- To enable or disable the generator, set `memes-enabled` in the main configuration to `true` or `false`.\n\n### Quotes\n\n- Quotes will be put into `resources/quotes.txt`.\n- Each line designates a new entry.\n- Quotes can use all placeholders except `$REPLY$`.\n- To set a cool down for quotes, set `quotes-cooldown` in the main configuration to any while number in seconds.\n- To enable or disable quotes, set `quotes-enabled` in the main configuration to `true` or `false`.\n\n### Files\n\n- Files will be put into `resources/files`.\n- To set a cool down for files, set `files-cooldown` in the main configuration to any whole number in seconds.\n- To enable or disable files, set `files-enabled` in the main configuration to `true` or `false`.\n\n### Responder\n\n- Responses will be put into `resources/responses.txt`.\n- Each line designates a new entry.\n- The format is `trigger: response`.\n- Append ` $\u0026\u0026$ response` to add a multi-message response.\n- Append ` $||$ response` to have multiple messages to randomly choose from for a response.\n- Case is ignored in the trigger.\n- The trigger can include Regex. Case is not ignored if you use Regex.\\\n- Trigger can use all placeholders except for `$REPLY$`.\n- The response can include all placeholders.\n- You can send a single file by adding `$FILE$ path/to/file $FILE$`.\n- The response sends with a delay based on message length multiplied by `responder-typing-speed` in the main\n  configuration in milliseconds. This number must be a whole number.\n- To set a delay between when the message is sent and when the bot starts to respond, set `responder-delay` in the main\n  configuration to any whole number in milliseconds.\n- To set a cool down for the responder, set `responder-cooldown` in the main configuration to whole any number in\n  seconds.\n- To enable or disable the responder, set `responder-enabled` in the main configuration to `true` or `false`.\n\n### Reactor\n\n- Reactions will be put into `resources/reactions.txt`.\n- Each line designates a new entry.\n- The format is `trigger: emote`.\n- Append ` $\u0026\u0026$ emote` to add a multi-emote reaction.\n- Append ` $||$ emote` to have multiple emotes to randomly choose from for a reaction.\n- Case is ignored in the trigger.\n- The trigger can include Regex. Case is not ignored if you use Regex.\n- Trigger can use all placeholders except for `$REPLY$`.\n- For the emote, you can put either a unicode emoji, `U+1F980`, or a raw discord emote, `:bonebot:819645061200347177`.\n- To set a delay between when the message is sent and when the bot reacts, set `reactor-delay` in the main configuration\n  to any whole number in milliseconds.\n- To set a cool down for the reactor, set `reactor-cooldown` in the main configuration to any whole number in seconds.\n- To enable or disable the reactor, set `reactor-enabled` in the main configuration to `true` or `false`.\n\n### Commands\n\n- Commands will be put into `resources/commands.txt`.\n- Each line designates a new entry.\n- The format is `command: description: response`.\n- Append ` $\u0026\u0026$ response` to add a multi-message response.\n- Append ` $||$ response` to have multiple messages to randomly choose from for a response.\n- Do not put the prefix in the command.\n- The response and description can include all placeholders.\n    - Description can not include `$REPLY$`\n- You can send a single file by adding `$FILE$ path/to/file $FILE$`.\n- You can add a reaction to the command trigger message by adding `$REACT$ emote $REACT$`. Format for emotes is similar\n  to the reactor.\n- You can have the command send as an embed instead by using `$EMBED$ embed title here $EMBED$`.\n    - If the embed title has the author's name, the bot's name, or the guild's name, the author icon will be set to\n      their image.\n- You can run a shell command by adding `$CMD$ command here $CMD$`.\n    - Need to run multiple commands? Make a shell script and run the script with a command, or separate commands with a\n      semi-colon!\n    - Add `$CMDOUT$` to your response to also include the output of this command in the response.\n    - If the above would return a file path, you can surround it with `$FILE$` to send that file.\n    - You can accept input from the Discord command by using path variables within the `$CMD$` blocks. These can be used\n      by doing `${VARIABLE}` in Linux and macOS, or `%VARIABLE%` in Windows. To view what variables are available and\n      what they are set to, check out the bottom of `modules/commands/Commands.kt`. There are too many variables, so\n      they are not listed here.\n- To change the command prefix, set `commands-prefix` in the main configuration to a custom prefix. Case is ignored.\n- To set a cool down for commands, set `commands-cooldown` in the main configuration to any whole number in seconds.\n- To enable or disable commands, set `commands-enabled` in the main configuration to `true` or `false`. This will\n  disable all built in command modules as well.\n\n### Statuses\n\n- Statuses will be put into `resources/statuses.txt`.\n- Each line designates a new entry.\n- Each line must start with `playing`, `watching`, or `listening to`.\n- The only placeholder that works for statuses is `$BOTDISPLAYNAME$`.\n- The main config has option `statuses-delay` to set how long each status shows in seconds as a whole number.\n- To enable or disable statuses, set `statuses-enabled` in the main configuration to `true` or `false`.\n\n### Welcomer\n\n- The welcome message is located `resources/messages.txt` under `welcome-message`.\n- The welcomer can use all placeholders except `$REPLY$`, `$CHANNELMENTION$`, and `$CHANNELNAME$`.\n- You can send a single file in the embed by adding `$FILE$ path/to/file $FILE$`.\n- To enable or disable the welcomer, set `welcomer-enabled` in the main configuration to `true` or `false`.\n\n### Messages\n\n- All messages built in to the bot are editable, located in `resources/messages.txt`.\n- Messages can include all placeholders\n    - `$AUTHORMENTION$`, `$BOTMENTION$`, `$CHANNELMENTION$`, and `$REPLY$` can not be used for embed titles.\n    - Command labels can not use any placeholders.\n    - Some messages have placeholders specific to their message, which can be found in the file.\n- Standard Discord Markdown formatting is supported.\n- This file can modify all built-in responses, command descriptions, and commands.\n- The `help-about` message can include a file foe the embed using the `$FILE$` format.\n\n### Miscellaneous\n\n- You can change the colors of embeds for the meme generator and help message by setting `embed-color` in the main\n  configuration to a hex code.\n- You can allow BoneBot to listen to input from other bots by setting `listen-to-bots` to `true`. It defaults\n  to `false`.\n- BoneBot spawns new threads to process every message, edit, and member join. To limit the maximum number of worker\n  threads at a time, set `max-threads` to any integer. 0 or lower removes the limit.\n- You can make other files and directories in the bot folder as needed for your own organization of files the bot may\n  use, but not for the files the bot requires.\n\n### Defaults\n\n##### Main Configuration\n\nLocated at `resources/config.txt`\n\n```\nresponder-enabled: true\nresponder-cooldown: 180\nresponder-delay: 1000\nresponder-typing-speed: 100\nreactor-enabled: true\nreactor-cooldown: 60\nreactor-delay: 1000\nmemes-enabled: true\nmemes-cooldown: 5\nmemes-size: 1200\nmemes-font-scale: 1.0\nstatuses-enabled: true\nstatuses-delay: 60\ncommands-enabled: true\ncommands-cooldown: 5\ncommands-prefix: bb\nquotes-enabled: true\nquotes-cooldown: 5\nfiles-enabled: true\nfiles-cooldown: 5\nwelcomer-enabled: true\nlisten-to-bots: false\nmax-threads: 8\nembed-color: #fd0605\nbot-token: TOKEN\n```\n\n##### Messages\n\nLocated at `resources/messages.txt`\n\n```\nhelp-title: $BOTDISPLAYNAME$ Help\nhelp-about: $BOTDISPLAYNAME$ aims to add more life to a server by responding and reacting to messages. It also adds commands, which are listed below.\nhelp-format: • **`$CMD$`**: $DESC$\nhelp-description: Show this help message.\nmeme-description: Generate a random or custom meme.\nfile-description: Send a random or specific file.\nquote-description: Send a random quote.\nhelp-command: help\nmeme-command: meme\nfile-command: file\nquote-command: quote\nmeme-title: $AUTHORDISPLAYNAME$ generated a meme:\nwelcome-title: $AUTHORDISPLAYNAME$ joined $GUILD$\nquote-title: \"$AUTHORDISPLAYNAME$ summoned a quote:\"\nfile-title: \"$AUTHORDISPLAYNAME$ summoned a file:\"\nwelcome-message: \"Welcome $AUTHORMENTION$ to **$GUILD$**!\"\nerror: **An error occurred!** Please check the console!\nunknown-command: **Unknown command!**\nno-files: There are **no files** to send!\nunknown-file: **Unknown file!**\nmeme-input-missing: Please provide the missing **text** and/or **image**!\nno-quotes: There are no quotes to show!\nmeme-cooldown: Another meme can be generated in **$TIME$** seconds.\nfile-cooldown: Another file can be sent in **$TIME$** seconds.\nquote-cooldown: Another quote can be sent in **$TIME$** seconds.\ncommand-cooldown: Commands can be used again in **$TIME$** seconds.\n```\n\n## Demonstration\n\nBelow are a few images showing what BoneBot can do. Simple actions, such as reactions, text responses, and status\nmessages, are not shown due to those being basic Discord functions.\n\n### Meme Generator\n\nThe following image is an example of the meme generator using a user's avatar, as well as top and bottom texts:\n\n\u003cdiv align=\"center\"\u003e\u003cimg src=\"img/meme.png\" alt=\"Meme generator example\" title=\"Meme generator example\" /\u003e\u003c/div\u003e\n\n### Help Command\n\nThe following image is an example of the help command, with some built-in commands disabled and some custom commands\nadded:\n\n\u003cdiv align=\"center\"\u003e\u003cimg src=\"img/help.png\" alt=\"Help example\" title=\"Help example\" /\u003e\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeremynoesen%2Fbonebot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeremynoesen%2Fbonebot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeremynoesen%2Fbonebot/lists"}