From fc2e8d2d98eda6893912d484e274c1be6c8d8397 Mon Sep 17 00:00:00 2001 From: dassenyy <65651014+dassenyy@users.noreply.github.com> Date: Tue, 9 Dec 2025 18:50:03 +0100 Subject: [PATCH 1/5] chore: remove `.github/` from gitignore to add issue forms --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 5011e2d..e636e58 100644 --- a/.gitignore +++ b/.gitignore @@ -11,7 +11,6 @@ __pycache__/ # . Files *.pyc .vscode/ -.github/ cache/ # C extensions From dc2195040af04180edbb6056fa8e131e4307432d Mon Sep 17 00:00:00 2001 From: dassenyy <65651014+dassenyy@users.noreply.github.com> Date: Tue, 9 Dec 2025 18:59:00 +0100 Subject: [PATCH 2/5] chore: add issue forms --- .github/ISSUE_TEMPLATE/01-bug-report.yml | 47 +++++++++++++++++++ .github/ISSUE_TEMPLATE/02-feature-request.yml | 42 +++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 5 ++ 3 files changed, 94 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/01-bug-report.yml create mode 100644 .github/ISSUE_TEMPLATE/02-feature-request.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml diff --git a/.github/ISSUE_TEMPLATE/01-bug-report.yml b/.github/ISSUE_TEMPLATE/01-bug-report.yml new file mode 100644 index 0000000..c8ad002 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/01-bug-report.yml @@ -0,0 +1,47 @@ +name: Bug Report +description: Create a new bug report. +title: "[BUG]: " +labels: ["bug", "awaiting review"] +body: + + - type: checkboxes + id: searched-issues + attributes: + label: Is there an existing issue for this? + description: 'Please search the issues to check if this bug has already been reported.' + options: + - label: I have searched the existing issues + validations: + required: true + + - type: textarea + id: current-behavior + attributes: + label: What happened? + description: Describe the problem you are experiencing. Feel free to include screenshots if helpful. + validations: + required: true + + - type: textarea + id: expected-behavior + attributes: + label: What do you expect to happen instead? + validations: + required: true + + - type: textarea + id: optional-textarea + attributes: + label: Anything else? (Optional) + validations: + required: false + + - type: checkboxes + id: author-assignment + attributes: + label: Assignment + description: Check this box if you would like to be assigned to work on this issue. + options: + - label: I would like to be assigned to this issue + validations: + required: false \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/02-feature-request.yml b/.github/ISSUE_TEMPLATE/02-feature-request.yml new file mode 100644 index 0000000..1ea10ea --- /dev/null +++ b/.github/ISSUE_TEMPLATE/02-feature-request.yml @@ -0,0 +1,42 @@ +name: Feature Request +description: Suggest a new feature or an enhancement to an already existing feature. +title: "[FEATURE]: " +labels: ["enhancement"] +body: + + - type: textarea + id: feature-problem + attributes: + label: Why do you want this feature? + description: >- + Describe the motivation behind this request. Does it address a problem or limitation, or would it improve the bot, user, or server experience? + placeholder: >- + "I'm always frustrated when [...]", "There is currently no way to do [...]", "It would improve the experience if [...]", etc. + validations: + required: true + + - type: textarea + id: feature-solution + attributes: + label: What would you like to see added, changed, or improved? + placeholder: >- + "Add a command that [...]", "It would help if the bot could [...]", etc. + validations: + required: true + + - type: textarea + id: optional-textarea + attributes: + label: Anything else? (Optional) + validations: + required: false + + - type: checkboxes + id: author-assignment + attributes: + label: Assignment + description: Check this box if you would like to be assigned to work on this issue. + options: + - label: I would like to be assigned to this issue + validations: + required: false \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..390a49f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: true +contact_links: + - name: Discord Community + url: https://discord.gg/54WX832HBM + about: Any Questions? Join our Discord server for real-time help and discussions \ No newline at end of file From dd985c1e32ff7b1e957142fa88b3d5ec29cefcbf Mon Sep 17 00:00:00 2001 From: dassenyy <65651014+dassenyy@users.noreply.github.com> Date: Tue, 9 Dec 2025 21:41:43 +0100 Subject: [PATCH 3/5] chore: adjust checkbox elements in issue forms Move the `required` key from the `validations` key to the `options` array so the form correctly requires the checkbox to be ticked. --- .github/ISSUE_TEMPLATE/01-bug-report.yml | 6 ++---- .github/ISSUE_TEMPLATE/02-feature-request.yml | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/01-bug-report.yml b/.github/ISSUE_TEMPLATE/01-bug-report.yml index c8ad002..5bbf7c2 100644 --- a/.github/ISSUE_TEMPLATE/01-bug-report.yml +++ b/.github/ISSUE_TEMPLATE/01-bug-report.yml @@ -11,8 +11,7 @@ body: description: 'Please search the issues to check if this bug has already been reported.' options: - label: I have searched the existing issues - validations: - required: true + required: true - type: textarea id: current-behavior @@ -43,5 +42,4 @@ body: description: Check this box if you would like to be assigned to work on this issue. options: - label: I would like to be assigned to this issue - validations: - required: false \ No newline at end of file + required: false \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/02-feature-request.yml b/.github/ISSUE_TEMPLATE/02-feature-request.yml index 1ea10ea..53423be 100644 --- a/.github/ISSUE_TEMPLATE/02-feature-request.yml +++ b/.github/ISSUE_TEMPLATE/02-feature-request.yml @@ -38,5 +38,4 @@ body: description: Check this box if you would like to be assigned to work on this issue. options: - label: I would like to be assigned to this issue - validations: - required: false \ No newline at end of file + required: false \ No newline at end of file From fe0b686aa5b98b32af8d5abcf23599c9fdf29d61 Mon Sep 17 00:00:00 2001 From: dassenyy <65651014+dassenyy@users.noreply.github.com> Date: Tue, 9 Dec 2025 21:42:27 +0100 Subject: [PATCH 4/5] chore: add code of conduct and contributing guidelines --- CODE_OF_CONDUCT.md | 90 +++++++++++++++++++++++++++++++++++++++ CONTRIBUTING.md | 103 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 193 insertions(+) create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..b9c6916 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,90 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our Hytale Modding community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community focused on helping everyone learn and succeed in Hytale modding. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our community include: + +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience +- Focusing on what is best not just for us as individuals, but for the overall community +- Helping newcomers get started with Hytale modding +- Sharing knowledge and resources generously +- Providing clear, accurate documentation + +Examples of unacceptable behavior include: + +- The use of sexualized language or imagery, and sexual attention or advances of any kind +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email address, without their explicit permission +- Spreading misinformation or deliberately misleading documentation +- Other conduct which could reasonably be considered inappropriate in a professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, including but not limited to: + +- GitHub repositories and discussions +- Discord servers +- Community forums and social media +- Virtual or in-person events representing the community + +It also applies when an individual is officially representing the community in public spaces. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement via GitHub issues or Discord moderators. + +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of actions. + +**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html). + +Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). + +For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are available at [https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations). \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..e06f252 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,103 @@ +# Contributing to the Hytale Modding Community Discord Bot + +Thank you for your interest in contributing to the Hytale Community Discord Bot! +This bot is a community-driven project built to support and enhance the Hytale Modding Discord server through helpful commands, integrations, and automation. +We welcome contributions from developers of all skill levels. + +## Table of Contents + +- [Code of Conduct](#code-of-conduct) +- [How Can I Contribute?](#how-can-i-contribute) +- [Setting up a Development Environment](#setting-up-a-development-environment) +- [Submitting Changes](#submitting-changes) +- [Community](#community) +- [Questions?](#questions) + +## Code of Conduct + +This project and everyone participating in it is governed by our [Code of Conduct](CODE_OF_CONDUCT.md). +By participating, you are expected to uphold this code. Please report unacceptable behavior to the project maintainers. + +## How Can I Contribute? + +### Submitting Issues + +You can help by submitting issues for: +- **Bug Reports**: Incorrect or unexpected behavior of commands or features, or other problems +- **Feature Requests:** New commands, integrations, automations, or improvements to existing features + +When opening an issue, please use a clear title, provide relevant details, include screenshots when helpful, and follow the appropriate issue template. + +### Contributing Code + +Before contributing code, open an issue if one does not exist already and get yourself assigned before starting. +If someone is already assigned, and you want to work on or expand the issue, coordinate with them first. +When submitting a pull request, make sure the related issue is tagged correctly. You can read more about this under [Submitting Changes](#submitting-changes). + +## Setting up a Development Environment + +### Prerequisites + +- Git +- An IDE or text editor (PyCharm, VS Code, etc.) +- Python 3.11 or higher +- [uv](https://docs.astral.sh/uv/getting-started/installation/) Python package and project manager +- A Discord bot application and a test server for development and testing + +### Local Development Setup + +1. Fork the repository on GitHub. +2. Clone your fork, rename the root directory if you like, and enter the directory. +3. Install dependencies: + ```bash + uv sync + ``` +4. Copy `.env.example` to `.env` and replace the TOKEN variable with your bot token. +5. Start the bot: + ```bash + uv run main.py + ``` + +## Submitting Changes + +> [!IMPORTANT] +> This project uses Conventional Commits. It is a specification that defines a consistent structure for commit messages and ensures a clear, machine-readable commit history. It is recommended that you [read the specification](https://www.conventionalcommits.org), which also includes examples and an FAQ. + +### Branch Workflow + +Before contributing, make sure your fork is up to date by syncing it on GitHub and pulling the latest changes locally. +Create a new branch in your fork with a clear, descriptive name for the issue you are working on, then implement your changes. +Commit and push your work. Split your work into multiple commits if there are a lot of changes that conform to multiple Conventional Commit types. +Once everything is tested and working, open a pull reqeust and follow the guidelines mentioned below. + +### Commit Messages + +When writing a commit message, follow these conventions: +- Structure the message according to the Conventional Commits specification +- Use present tense: "Add feature" not "Added feature" +- Use imperative mood: "Fix bug" not "Fixes bug" +- Keep first line under 72 characters +- Use the optional body to add detail or context if needed + +### Pull Requests + +When opening a pull request: +- Tag the related issue in the title using the correct format: + ``` + GH-: Title + + Example: + GH-37: Add auto-thread command + ``` +- Explain what you changed, why you changed it (if helpful), and note anything reviewers should pay attention to in particular +- Test your changes before submitting the pull request + +## Community + +Join our [Discord server](https://discord.gg/54WX832HBM) for real-time help and discussions! Contributors may also claim a role, recognizing their help to the community. + +## Questions? + +If you have any questions not covered in this contributing guide, feel free to ask in the Discord server or to reach out to a project maintainer. + +Thank you for contributing to the Hytale Modding Discord Bot! \ No newline at end of file From a8ddfc9cc0d2f07201faac3e0e403a23f74364cb Mon Sep 17 00:00:00 2001 From: dassenyy <65651014+dassenyy@users.noreply.github.com> Date: Sun, 18 Jan 2026 13:56:25 +0100 Subject: [PATCH 5/5] chore: update CONTRIBUTING and README to fit new project structure --- CONTRIBUTING.md | 7 ++++++- README.md | 28 ++++++++++++++++------------ 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e06f252..7f99613 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -43,6 +43,7 @@ When submitting a pull request, make sure the related issue is tagged correctly. - Python 3.11 or higher - [uv](https://docs.astral.sh/uv/getting-started/installation/) Python package and project manager - A Discord bot application and a test server for development and testing +- Access to a MySQL database ### Local Development Setup @@ -52,11 +53,15 @@ When submitting a pull request, make sure the related issue is tagged correctly. ```bash uv sync ``` -4. Copy `.env.example` to `.env` and replace the TOKEN variable with your bot token. +4. Copy `.env.example` to `.env` and configure the required environment variables: + - A Discord bot token (TOKEN) + - Database connection variables (see the settings module for details) 5. Start the bot: ```bash uv run main.py ``` +6. Fill out all required values of the generated `config_template.json` and copy it to `config.json` before restarting the bot when starting it for the first time. + - When running the bot with docker, make sure to mount the root directory to the docker working directory with `-v /:/app` ## Submitting Changes diff --git a/README.md b/README.md index da77d25..2e7c8b2 100644 --- a/README.md +++ b/README.md @@ -4,18 +4,22 @@ This bot is used for utility and moderation features for the Hytale Modding Disc ## Host yourself -1. Install Python 3.11 or higher. -2. Install [uv](https://docs.astral.sh/uv/getting-started/installation/) package manager. -3. Install the dependencies using the following command: -``` -uv sync -``` -4. Copy the `.env.example` to `.env` and replace the TOKEN variable with your bot token -5. Run the bot using the following command: -``` -uv run main.py -``` +1. Fork the repository on GitHub. +2. Clone your fork, rename the root directory if you like, and enter the directory. +3. Install dependencies: + ```bash + uv sync + ``` +4. Copy `.env.example` to `.env` and configure the required environment variables: + - A Discord bot token (TOKEN) + - Database connection variables (see the settings module for details) +5. Start the bot: + ```bash + uv run main.py + ``` +6. Fill out all required values of the generated `config_template.json` and copy it to `config.json` before restarting the bot when starting it for the first time. + - When running the bot with docker, make sure to mount the root directory to the docker working directory with `-v /:/app` ### Contributions -All contributions are welcome in forms of PRs, if any issues are found, please create an issue (or PR if you can fix it yourself). \ No newline at end of file +All contributions are welcome in the form of PRs linked to an issue. If an issue does not exist already, open one first. For more information about contributing standards in this repository, view the [CONTRIBUTING](/CONTRIBUTING.md) guidelines. \ No newline at end of file