From f047dd80ca384bd849682e6d1e3a63007c9e2fd4 Mon Sep 17 00:00:00 2001 From: shuuy Date: Mon, 14 Oct 2024 00:34:41 -0700 Subject: [PATCH] Officially oss this stupid bot --- LICENSE-AGPL-3.0 => LICENSE-AGPL | 0 LICENSE-MIT | 2 + LICENSE-POLYFORM | 173 ------------------ README.md | 2 +- api/LICENSE-AGPL | 1 + bot/LICENSE-AGPL | 1 + bot/LICENSE-POLYFORM | 1 - common/LICENSE-MIT | 1 + docs/CODE_OF_CONDUCT.md | 39 +++- docs/Contributing.md | 52 +++++- docs/Dependencies.md | 4 +- docs/PRIVACY_POLICY.md | 9 +- docs/TERMS_OF_SERVICE.md | 34 +--- subprojects/cache/{LICENSE => LICENSE-AGPL} | 0 .../database/{LICENSE => LICENSE-AGPL} | 0 subprojects/metrics/{LICENSE => LICENSE-AGPL} | 0 16 files changed, 105 insertions(+), 214 deletions(-) rename LICENSE-AGPL-3.0 => LICENSE-AGPL (100%) delete mode 100644 LICENSE-POLYFORM create mode 100644 api/LICENSE-AGPL create mode 100644 bot/LICENSE-AGPL delete mode 100644 bot/LICENSE-POLYFORM create mode 100644 common/LICENSE-MIT rename subprojects/cache/{LICENSE => LICENSE-AGPL} (100%) rename subprojects/database/{LICENSE => LICENSE-AGPL} (100%) rename subprojects/metrics/{LICENSE => LICENSE-AGPL} (100%) diff --git a/LICENSE-AGPL-3.0 b/LICENSE-AGPL similarity index 100% rename from LICENSE-AGPL-3.0 rename to LICENSE-AGPL diff --git a/LICENSE-MIT b/LICENSE-MIT index ccda2d2..7089fb3 100644 --- a/LICENSE-MIT +++ b/LICENSE-MIT @@ -1,3 +1,5 @@ +MIT License + Copyright (c) 2024 shuuyu Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/LICENSE-POLYFORM b/LICENSE-POLYFORM deleted file mode 100644 index c944dce..0000000 --- a/LICENSE-POLYFORM +++ /dev/null @@ -1,173 +0,0 @@ -# Note on the Polyform Shield License 1.0.0 -Nabi is currently licensed under the Polyform Shield License 1.0.0. However, -when Nabi reaches the stable version (>=1.0.0), all prior and future code will -be exclusively licensed under the GNU AGPL-3.0 License, making this project -open-sourced. By contributing to Nabi during the trial period, you consent to -relicensing your commit to the GNU AGPL-3.0 License after a stable version -has been implemented. Any commits made after 0.1.0 will be licensed under the -GNU AGPL-3.0 License. - -8# PolyForm Shield License 1.0.0 - - - -## Acceptance - -In order to get any license under these terms, you must agree -to them as both strict obligations and conditions to all -your licenses. - -## Copyright License - -The licensor grants you a copyright license for the -software to do everything you might do with the software -that would otherwise infringe the licensor's copyright -in it for any permitted purpose. However, you may -only distribute the software according to [Distribution -License](#distribution-license) and make changes or new works -based on the software according to [Changes and New Works -License](#changes-and-new-works-license). - -## Distribution License - -The licensor grants you an additional copyright license -to distribute copies of the software. Your license -to distribute covers distributing the software with -changes and new works permitted by [Changes and New Works -License](#changes-and-new-works-license). - -## Notices - -You must ensure that anyone who gets a copy of any part of -the software from you also gets a copy of these terms or the -URL for them above, as well as copies of any plain-text lines -beginning with `Required Notice:` that the licensor provided -with the software. For example: - -> Required Notice: Copyright Yoyodyne, Inc. (http://example.com) - -## Changes and New Works License - -The licensor grants you an additional copyright license to -make changes and new works based on the software for any -permitted purpose. - -## Patent License - -The licensor grants you a patent license for the software that -covers patent claims the licensor can license, or becomes able -to license, that you would infringe by using the software. - -## Noncompete - -Any purpose is a permitted purpose, except for providing any -product that competes with the software or any product the -licensor or any of its affiliates provides using the software. - -## Competition - -Goods and services compete even when they provide functionality -through different kinds of interfaces or for different technical -platforms. Applications can compete with services, libraries -with plugins, frameworks with development tools, and so on, -even if they're written in different programming languages -or for different computer architectures. Goods and services -compete even when provided free of charge. If you market a -product as a practical substitute for the software or another -product, it definitely competes. - -## New Products - -If you are using the software to provide a product that does -not compete, but the licensor or any of its affiliates brings -your product into competition by providing a new version of -the software or another product using the software, you may -continue using versions of the software available under these -terms beforehand to provide your competing product, but not -any later versions. - -## Discontinued Products - -You may begin using the software to compete with a product -or service that the licensor or any of its affiliates has -stopped providing, unless the licensor includes a plain-text -line beginning with `Licensor Line of Business:` with the -software that mentions that line of business. For example: - -> Licensor Line of Business: YoyodyneCMS Content Management -System (http://example.com/cms) - -## Sales of Business - -If the licensor or any of its affiliates sells a line of -business developing the software or using the software -to provide a product, the buyer can also enforce -[Noncompete](#noncompete) for that product. - -## Fair Use - -You may have "fair use" rights for the software under the -law. These terms do not limit them. - -## No Other Rights - -These terms do not allow you to sublicense or transfer any of -your licenses to anyone else, or prevent the licensor from -granting licenses to anyone else. These terms do not imply -any other licenses. - -## Patent Defense - -If you make any written claim that the software infringes or -contributes to infringement of any patent, your patent license -for the software granted under these terms ends immediately. If -your company makes such a claim, your patent license ends -immediately for work on behalf of your company. - -## Violations - -The first time you are notified in writing that you have -violated any of these terms, or done anything with the software -not covered by your licenses, your licenses can nonetheless -continue if you come into full compliance with these terms, -and take practical steps to correct past violations, within -32 days of receiving notice. Otherwise, all your licenses -end immediately. - -## No Liability - -***As far as the law allows, the software comes as is, without -any warranty or condition, and the licensor will not be liable -to you for any damages arising out of these terms or the use -or nature of the software, under any kind of legal claim.*** - -## Definitions - -The **licensor** is the individual or entity offering these -terms, and the **software** is the software the licensor makes -available under these terms. - -A **product** can be a good or service, or a combination -of them. - -**You** refers to the individual or entity agreeing to these -terms. - -**Your company** is any legal entity, sole proprietorship, -or other kind of organization that you work for, plus all -its affiliates. - -**Affiliates** means the other organizations than an -organization has control over, is under the control of, or is -under common control with. - -**Control** means ownership of substantially all the assets of -an entity, or the power to direct its management and policies -by vote, contract, or otherwise. Control can be direct or -indirect. - -**Your licenses** are all the licenses granted to you for the -software under these terms. - -**Use** means anything you do with the software requiring one -of your licenses. \ No newline at end of file diff --git a/README.md b/README.md index f1ad4e1..f4520fb 100644 --- a/README.md +++ b/README.md @@ -13,5 +13,5 @@ open sourced initiative, making it so anyone can see and utilize portions of our ___

- Copyright (c) 2024 CatgirlClient & yujin. Nabi is licensed under the PolyForm Shield License 1.0.0 unless otherwise stated. All rights reserved. + Copyright (c) 2024 CatgirlClient & yujin. Nabi is licensed under the GNU AGPL-3.0 License unless otherwise stated. All rights reserved.

diff --git a/api/LICENSE-AGPL b/api/LICENSE-AGPL new file mode 100644 index 0000000..5f5cf25 --- /dev/null +++ b/api/LICENSE-AGPL @@ -0,0 +1 @@ +../../LICENSE-AGPL \ No newline at end of file diff --git a/bot/LICENSE-AGPL b/bot/LICENSE-AGPL new file mode 100644 index 0000000..5f5cf25 --- /dev/null +++ b/bot/LICENSE-AGPL @@ -0,0 +1 @@ +../../LICENSE-AGPL \ No newline at end of file diff --git a/bot/LICENSE-POLYFORM b/bot/LICENSE-POLYFORM deleted file mode 100644 index 17c26ae..0000000 --- a/bot/LICENSE-POLYFORM +++ /dev/null @@ -1 +0,0 @@ -../../LICENSE-POLYFORM \ No newline at end of file diff --git a/common/LICENSE-MIT b/common/LICENSE-MIT new file mode 100644 index 0000000..b2cfbdc --- /dev/null +++ b/common/LICENSE-MIT @@ -0,0 +1 @@ +../../LICENSE-MIT \ No newline at end of file diff --git a/docs/CODE_OF_CONDUCT.md b/docs/CODE_OF_CONDUCT.md index 203a7ef..d08c99c 100644 --- a/docs/CODE_OF_CONDUCT.md +++ b/docs/CODE_OF_CONDUCT.md @@ -1,2 +1,37 @@ -# Nabi's Code of Conduct -Nabi maintains a code of conduct to help facilitate the \ No newline at end of file +# Code of Conduct +**Last Modified: 6/10/24** + +[Privacy Policy](../docs/PRIVACY_POLICY.md) - [Terms of Service](../docs/TERMS_OF_SERVICE.md) + +## Our Motivation +Our plans are to foster a positive community that aids moderators, modders, and the average end-user and other +like-minded individuals in their journey of keeping their communities healthy and prosperous. Due to these aforementioned +reasons, we utilize and maintain a Code of Conduct to help facilitate those actions, and help blossom a beautiful community. + +## Our Pledge +We pledge the following clauses for our services: + +* To provide services which are to be deemed free and available to all forms of users. +* To foster a safe and friendly community for every group of people. +* To continue and produce open sourced software for the end user. + +## Your Pledge +You pledge to abide by the following clauses, and accept punishment if any of these clauses are broken: + +* To not discriminate any person for any particular reasons and/or action. +* To not disrupt any operations of our services in any capacity. +* To not utilize any sexual imagery or make any sexual advances. +* To not harass any community members (privately or publicly). +* To follow the respective Terms of Service wherever it be deemed necessary ([Discord's TOS](https://discord.com/terms) - [Nabi's TOS](../docs/TERMS_OF_SERVICE.md)) +* To not maliciously attack any user there be it by software or by practice. +* To use common sense. All pledges are implied unless otherwise stated by a member of the team. + +## Enforcement +Breaking any of the aforementioned clauses in the section titled **"Your Pledges"** is unacceptable, and will result in +swift punishment. We harbour a safe and friendly environment for all people regardless of race, color, and orientation. +Due to this, staff/owners retain the right to punish you wherever it be deemed fit. Staff/owners also reserve the rights +to decide the punishment associated with the broken pledge. In short, +*Nabi and her respective staff have the right to punish/remove you if we deem fit.* + +Instances of this pledge may be reported to us wherever it be deemed fit, whether that be by direct messages, emails, +or informing us in the necessary channels. \ No newline at end of file diff --git a/docs/Contributing.md b/docs/Contributing.md index 422730e..935adb5 100644 --- a/docs/Contributing.md +++ b/docs/Contributing.md @@ -1,14 +1,58 @@ # Contributing -Contributions are always welcomed by the Nabi team. +Contributions are always welcomed by the Nabi team, as we strive to be both free and open source. ## Building and Running Nabi +> [!WARNING] +> Nabi wasn't made for the intention of being self-hosted, as it's typically taylored for larger servers and higher load +> operations. Due to this, you won't recieve support beyond this guide on how to set up Nabi and run her related services. + Nabi requires the following dependencies: * Java 17 (Discord InteraKTions require it for webserver based interactions.) * Redis/Any Redis compatible in memory database (Required by [`subprojects/cache`](../subprojects/cache)) * PostgreSQL (Required by [`subprojects/database`](../subprojects/database), though you can swap this out.) -* An HTTP server (*Optional*, although if you want other users to access Nabi's servers and websites, you'll need to specify this.) +* An HTTP server (*Optional*, although if you want other users to access Nabi's servers and websites, you'll need to specify this. +I personally recommend Caddy or Nginx for reverse proxying, but you could use anything related to the above.) + +Nabi also doesn't make usage of a ``.env`` file like other related bots. Instead, it processes information from a ``nabi-config.toml``. +If you run the process without the file above, the environment will stop and create one for you. You **MUST** have the +following in your file for the bot to run. + +```toml +[discord] +token = "discord_token" +applicationId = "app_id" +defaultGuildId = "default_guild_id" +shards = 999 +defaultPrefix = "?" +ownerIds = ["your", "owner", "ids"] +publicKey = "public_key" # This is only necessary if you want to have webserver interactions. +port = 12212 # This is only necessary if you want to have webserver interactions. + +[database] +addresses = "postgresql_address" +username = "jdbc_username" +password = "jdbc_password" +port = 9203 + +[cache] +addresses = ["cache", "addresses"] +username = "redis_username" +password = "redis_password" +``` + +Once you've filled out the following, your bot should be running smoothly! Keep in mind that you may need to tinker more +in order to fine tune Nabi for your specific needs, and that's okay, as Nabi was made to be flexible and diverse. + +## Contributing Guidelines +If you are going to contribute, please note the following: + +* If there is an issue related to one of our libraries, please report it to the respective repository instead of making a +workaround. This should only be used in a worst case scenario, and should not **EVER** be excercised. +* We may only accept certain pull requests if it's beneficial to the Nabi ecosystem. +* You should almost **NEVER** target the experimental branch when it comes to pull requests, as we intend on making breaking +changes with this branch. ## Important Contributors -* yujin - Primary owner of Nabi and maintainer of all of her services. -* my-name-is-jeff - Some idiot \ No newline at end of file +* [yujin](https://github.com/shuuyu) - Primary code maintianer and operator of Nabi. +* [my-name-is-jeff](https://github.com/My-Name-Is-Jeff) - Some idiot who doesn't contribute \ No newline at end of file diff --git a/docs/Dependencies.md b/docs/Dependencies.md index a781b5a..cfd508f 100644 --- a/docs/Dependencies.md +++ b/docs/Dependencies.md @@ -15,8 +15,8 @@ Nabi would not be possible without the following dependencies! * [HikariCP](https://github.com/brettwooldridge/HikariCP) * [Postgresql](https://github.com/pgjdbc/pgjdbc) -In the future, we plan to use the following dependencies: -* [Sqiffy](https://github.com/dzikoysk/sqiffy/tree/main) - This will replace Exposed. +In the future, we may plan to use the following dependencies: +* [Sqiffy](https://github.com/dzikoysk/sqiffy/tree/main) - This will possibly replace Exposed. ## Discord Library/Frameworks * [Kord](https://github.com/kordlib/kord) diff --git a/docs/PRIVACY_POLICY.md b/docs/PRIVACY_POLICY.md index 72d80e2..5496f6a 100644 --- a/docs/PRIVACY_POLICY.md +++ b/docs/PRIVACY_POLICY.md @@ -1,7 +1,7 @@ # Privacy Policy -Nabi, if inside a server you're in, will collect your user/member information in order to speed up her processing of -commands. Nabi and her developers promise to never sell your user information in any form, and will only cache -necessary information. This information includes: +Nabi, if inside a server you're in, will collect and store your Discord user/member information in order to speed +up her processing of commands and other related processes. Nabi and her developers promise to never sell your user +information in any form, and will only cache necessary information. This information includes: * Guild Information * Member Information @@ -9,4 +9,5 @@ necessary information. This information includes: * Message Information * Role Information -Your information will, by default, be deleted after 30 days if it hasn't been used within that time frame. \ No newline at end of file +Your information will, by default, be deleted after 30 days if it hasn't been used within that time frame. If you ever +decide to delete any user information, please contact us directly in order to remove any related information. \ No newline at end of file diff --git a/docs/TERMS_OF_SERVICE.md b/docs/TERMS_OF_SERVICE.md index 8d4896b..353b9b9 100644 --- a/docs/TERMS_OF_SERVICE.md +++ b/docs/TERMS_OF_SERVICE.md @@ -1,7 +1,7 @@ # Nabi's Terms of Service **Last Updated: 19/9/2024** -By using any services in relation to Nabi, you agree to both the [Discord Terms and Services]() and +By using any services in relation to Nabi, you agree to both the [Discord Terms and Services](https://discord.com/terms) and our related terms of service. You agree that breaking any terms will result in complete termination of your ability to use any services related to Nabi. You may also be blacklisted from any services from Nabi at any time for no given reason by the discression of the developers. @@ -29,31 +29,11 @@ Nabi and her developers take your privacy seriously. **Nabi will only collect da See (../docs/PRIVACY_POLICY.md) for more information. -## Legal -> [!NOTE] -> This currently only applies to code licensed under the GNU AGPL License. Code licensed under the current Polyform Shield -> 1.0.0 License specifically state that you cannot compete, meaning that you cannot profiteer off of the work of Nabi -> and her developers. - -Nabi and her developers require you to specify the license if you utilize any form of our source code in your project. Nabi -is intentionally open-source to an extent to encourage people to develop upon the bot. - -## Noncompete & License Compliance -Nabi was purely made source available for both security, transparency, and being completely free. We understand that -users may be reluctant to adopt Nabi and her services due to a lack of transparency, thus opening her source code for -people to analyze. - -For any and all services of Nabi's license which are labeled under the Polyform Shield 1.0.0 license or any non-compete -related licenses, you agree to not compete with her services, and agree to not profiteer off of the work from her developers. -You agree to follow the license of whatever the subproject/project is licensed under. You are to assume projects without -any given/provided licenses are All Rights Reserved (ARR), and thus fall under our jurisdiction. Failure to comply may -result in the possible invokation of the Digital Millenium Copyright Act (DMCA). - -> [!NOTE] -> This agreement will change when Nabi enters a stable release, instead using AGPL-3.0 for her license. This will only -> apply to her bot, not any other related components. We will remove the noncompete term once AGPL-3.0 or another license -> is pushed. +## Legal and License Compliance +We license all code under the [``:api``](../api), [``:bot``](../bot), and [``:subprojects``](../subprojects) directory under the +GNU AGPL-3.0 License, while every other project would be licensed under the MIT License. We kindly emplore developers who +use our code to please follow the license stated, as we are a non-profit organization. ## Access & Noncompliance -You agree to not harm any and all services in relation to Nabi, and agree that your ability to use Nabi may be removed at -any time. \ No newline at end of file +You agree to not harm any and all services in relation to Nabi, and agree that your ability to use Nabi and her service +may be revoked at any time. \ No newline at end of file diff --git a/subprojects/cache/LICENSE b/subprojects/cache/LICENSE-AGPL similarity index 100% rename from subprojects/cache/LICENSE rename to subprojects/cache/LICENSE-AGPL diff --git a/subprojects/database/LICENSE b/subprojects/database/LICENSE-AGPL similarity index 100% rename from subprojects/database/LICENSE rename to subprojects/database/LICENSE-AGPL diff --git a/subprojects/metrics/LICENSE b/subprojects/metrics/LICENSE-AGPL similarity index 100% rename from subprojects/metrics/LICENSE rename to subprojects/metrics/LICENSE-AGPL