Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
e5c9ef3
Added TOS and PP
Zabuzard Feb 14, 2022
4f39125
added link to PP in TOS
Zabuzard Feb 14, 2022
49303cc
Reaction roles using a SelectionMenu (#351)
Tais993 Feb 15, 2022
17b720f
Renamed Staff Assistants to Maintainers
Zabuzard Feb 15, 2022
06846b9
Replaced Config singleton with regular instance
Zabuzard Feb 15, 2022
12c614e
Mocking for final classes
Zabuzard Feb 15, 2022
b676942
Added possibility to test with database
Zabuzard Feb 15, 2022
b3a37eb
Improved command mocking
Zabuzard Feb 15, 2022
b4c1947
Added tests for the tag-system
Zabuzard Feb 15, 2022
750459b
Added note command
Zabuzard Feb 16, 2022
7d63e70
Newlines for readability from CR
Zabuzard Feb 18, 2022
56b7d18
Up- and down-voting on suggestions
Zabuzard Feb 16, 2022
ec6390b
adding custom emotes with fallback for suggestions
Zabuzard Feb 18, 2022
47d6a82
Removal of ALL subcommands on RoleSelectCommand (#389)
Tais993 Feb 21, 2022
6f221a1
Pushing the remider command, which works while the bot is online.
DevSerendipity Feb 9, 2022
39a2120
Reworking first part of remind command
Zabuzard Feb 9, 2022
7d5b0b0
Adding proper "when" selection for /remind
Zabuzard Feb 10, 2022
89b8e93
Adding remind routine to send reminders
Zabuzard Feb 10, 2022
5f5ada1
Javadoc and cleanup for /remind
Zabuzard Feb 11, 2022
9d471fe
Mention the user in the reminder
Zabuzard Feb 11, 2022
dd4d107
Bugfix with user not found
Zabuzard Feb 11, 2022
db3c8c6
Adding max-pending-reminders-per-user limit
Zabuzard Feb 11, 2022
d4fe78d
Send reminder per DM if failing to send in guild
Zabuzard Feb 14, 2022
7d3c1cd
Improvements from CR
Zabuzard Feb 15, 2022
d869b0b
UX renamings of the remind options
Zabuzard Feb 21, 2022
99ff917
ReminderRoute factories for readability
Zabuzard Feb 21, 2022
fb04892
UX swapped whenUnit and whenAmount
Zabuzard Feb 22, 2022
c4c76a9
Multiline log message
Zabuzard Feb 22, 2022
8630f32
Renamings from CR
Zabuzard Feb 23, 2022
aabdb29
Simplified DM route creation
Zabuzard Feb 23, 2022
aa68787
Loggers are used consistently from fields now
java-coding-prodigy Feb 23, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @Together-Java/moderators @Together-Java/staff-assistants
* @Together-Java/moderators @Together-Java/maintainers
114 changes: 114 additions & 0 deletions PP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# Privacy Policy

## Definitions

* "**TJ-Bot**" (also "**bot**") refers to the Discord bot that is subject under this policy
* "**[Together Java](https://github.com/orgs/Together-Java/teams/moderators/members)**" (also "**We**" or "**Us**") is the group of people responsible for the **TJ-Bot** product

## Preample

This Privacy Policy document contains types of information that is collected and recorded by **TJ-Bot** and how **Together Java** uses it.

If you have additional questions or require more information about **Together Java**'s Privacy Policy, do not hesitate to [contact us](#contact).

## General Data Protection Regulation (GDPR)

We are a Data Controller of your information.

**Together Java** legal basis for collecting and using the personal information described in this Privacy Policy depends on the Personal Information we collect and the specific context in which we collect the information:

* You have given **Together Java** permission to do so
* Processing your personal information is in **Together Java** legitimate interests
* **Together Java** needs to comply with the law

**Together Java** will retain your personal information only for as long as is necessary for the purposes set out in this Privacy Policy. We will retain and use your information to the extent necessary to comply with our legal obligations, resolve disputes, and enforce our policies.

If you are a resident of the European Economic Area (EEA), you have certain data protection rights. If you wish to be informed what Personal Information we hold about you and if you want it to be removed from our systems, please [contact us](#contact).

In certain circumstances, you have the following data protection rights:

* The right to access, update or to delete the information we have on you.
* The right of rectification.
* The right to object.
* The right of restriction.
* The right to data portability
* The right to withdraw consent

## Usage of Data

**TJ-Bot** may use stored data, as defined below, to offer different features and services. No usage of data outside of the aformentioned cases will happen and the data is not shared with any third-party site or service.

### Databases

**TJ-Bot** uses databases to store information about users, in order to provide its features and services. The database schemas are public source and can be viewed [here](https://github.com/Together-Java/TJ-Bot/tree/develop/application/src/main/resources/db).

The databases may store
* `user_id` of users (the unique id of a Discord account),
* `timestamp`s of actions (for example when a command has been used),
* `guild_id` of guilds the **bot** is member of (the unique id of a Discord guild),
* `channel_id` of channels belonging to guilds the **bot** is member of (the unique id of a Discord channel),
* `message_id` of messages send by users in guilds the **bot** is member of (the unique id of a Discord message),

and any combination of those.

For example, **TJ-Bot** may associate your `user_id` with a `message_id` and a `timestamp` for any message that you send in a channel belonging to guilds the **bot** is member of.

**TJ-Bot** may further store data that you explicitly provided for **TJ-Bot** to offer its services. For example the reason of a moderative action when using its moderation commands.

The stored data is not linked to any information that is personally identifiable.

No other personal information outside of the above mentioned one will be stored. In particular, **TJ-Bot** does not store the content of sent messages.

### Log Files

**TJ-Bot** follows a standard procedure of using log files. These files log users when they use one of the **bot**'s provided commands, features or services.

The information collected by log files include

* `user_name` of users (the nickname of a Discord account),
* `user_discrimator` of users (the unique discriminator of a Discord account),
* `user_id` of users (the unique id of a Discord account),
* `timestamp`s of actions (for example when a command has been used),
* `guild_id` of guilds the **bot** is member of (the unique id of a Discord guild),
* `channel_id` of channels belonging to guilds the **bot** is member of (the unique id of a Discord channel),
* `message_id` of messages send by users in guilds the **bot** is member of (the unique id of a Discord message).

The stored data is not linked to any information that is personally identifiable.

No other personal information outside of the above mentioned one will be stored. In particular, **TJ-Bot** does not store the content of sent messages.

The purpose of the information is for analyzing trends, administering the **bot**, and gathering demographic information.

### Temporarely stored Information

**TJ-Bot** may keep the stored information in an internal cacheing mechanic for a certain amount of time. After this time period, the cached information will be dropped and only be re-added when required.

Data may be dropped from cache pre-maturely through actions such as removing the **bot** from a Server.

## Removal of Data

Removal of the data can be requested through e-mail at [[email protected]](mailto:[email protected]).

For security reasons will we ask you to provide us with proof of ownership of the Server, that you wish the data to be removed of. Only a server owner may request removal of data and requesting it will result in the bot being removed from the Server, if still present on it.

## Third Party Privacy Policies

This Privacy Policy does not apply to other linked websites or service providers. Thus, we are advising you to consult the respective Privacy Policies of these third-party websites or services for more detailed information. It may include their practices and instructions about how to opt-out of certain options.

## Children's Information

Another part of our priority is adding protection for children while using the internet. We encourage parents and guardians to observe, participate in, and/or monitor and guide their online activity.

**TJ-Bot** does not knowingly collect any Personal Identifiable Information from children under the age of 13. If you think that your child provided this kind of information to our **bot**, we strongly encourage you to [contact us](#contact) immediately and we will do our best efforts to promptly remove such information from our records.

## Limitations

Our Privacy Policy applies only to **TJ-Bot** instances that are member of a Server owned by **Together Java**.

This policy is not applicable to any information collected by **bot** instances hosted by other parties, even if they have been build based on our official [source](https://github.com/Together-Java/TJ-Bot). This policy is also not applicable to any information collected via channels other than this **bot**, such as the data collected by linked websites.

## Contact

People may get in contact through e-mail at [[email protected]](mailto:[email protected]), or through **Together Java**'s [official Discord](https://discord.com/invite/XXFUXzK).

Other ways of support may be provided but are not guaranteed.
74 changes: 74 additions & 0 deletions TOS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Terms of Service

## Definitions

* "**TJ-Bot**" (also "**bot**") refers to the Discord bot that is subject under these terms
* "**[Together Java](https://github.com/orgs/Together-Java/teams/moderators/members)**" (also "**We**") is the group of people responsible for the **TJ-Bot** product, to whom you agree to on accepting these terms

## Usage Agreement

By inviting **TJ-Bot** and using its features (accessible via [Discord](https://discord.com/), source at [GitHub](https://github.com/Together-Java/TJ-Bot)), you are agreeing to be bound by these Terms and Conditions of Use and agree that you are responsible for the agreement with any applicable local laws. If you disagree with any of these terms, you are prohibited from using this **bot**. The materials contained and used by the **bot** are protected by copyright and trade mark law.

### Servers

You acknowledge that you must only invite the **bot** to a Server owned by **Together Java**, and only with their explicit approval.

Further, you have the priviledge to build and host the **bot** based on the [source](https://github.com/Together-Java/TJ-Bot) yourself. You may use such a self-hosted **bot** freely on any Discord Server (Server) you share with it, you can invite it to any Server that you have "Manage Server" rights for and you acknowledge that this priviledge might get revoked for you, if you're subject of breaking the terms and/or policy of this **bot**, or the Terms of Service, Privacy Policy and/or Community Guidelines of Discord Inc.

Through Inviting, the **bot** may collect specific data as described in its [Privacy Policy](#your-privacy).
The intended usage of this data is for core functionalities of the **bot** such as command handling.

## Intended Age

The **bot** may not be used by individuals under the minimal age described in Discord's Terms of Service.

Doing so will be seen as a violation of these terms. Upon violation, your usage right will also be terminated and you have to remove the **bot** from any Server that you have "Manage Server" rights for, as well as destroy any downloaded materials in your possession whether it is printed or electronic format.

## Affiliation

The **bot** is not affiliated with, supported or made by Discord Inc., Sun Microsystems or Oracle.

Any direct connection to Discord, Sun Microsystems, Oracle or any of their Trademark objects is purely coincidental. **Together Java** does not claim to have the copyright ownership of any of Discord's, Sun Microsystems' or Oracle's assets, trademarks or other intellectual property.

## Use License

Through using the **bot**, you acknownledge to adhere to the terms defined by its [license](https://github.com/Together-Java/TJ-Bot/blob/develop/LICENSE).

This will let **Together Java** to terminate upon violations of any of these restrictions. Upon termination, your usage right will also be terminated and you have to remove the **bot** from any Server that you have "Manage Server" rights for, as well as destroy any downloaded materials in your possession whether it is printed or electronic format.

## Disclaimer

All the materials used by **TJ-Bot** are provided "as is". **Together Java** makes no warranties, may it be expressed or implied, therefore negates all other warranties. Furthermore, **Together Java** does not make any representations concerning the accuracy or reliability of the use of the materials on **TJ-Bot** or otherwise relating to such materials or any sites linked by this **bot**.

## Limitations

**Together Java** or its suppliers will not be hold accountable for any damages that will arise with the use or inability to use the materials or services provided by **TJ-Bot**, even if **Together Java** or an authorize representative of this **bot** has been notified, orally or written, of the possibility of such damage. Some jurisdiction does not allow limitations on implied warranties or limitations of liability for incidental damages, these limitations may not apply to you.

**Together Java** may not be made liable for individuals breaking these Terms at any given time.
**Together Java** has faith in the end users being truthfull about their information and not missusing this **bot** or The Services of Discord Inc in a malicious way.

## Revisions and Errata

The materials used by **TJ-Bot** may include technical, typographical, or photographic errors. **Together Java** will not promise that any of these materials are accurate, complete, or current. **Together Java** may change the materials used by **TJ-Bot** at any time without notice. **Together Java** does not make any commitment to update the materials.

## Links

**Together Java** has not reviewed all of the sites linked to **TJ-Bot** and is not responsible for the contents of any such linked site. The presence of any link does not imply endorsement by **Together Java** of the site. The use of any linked website is at the user’s own risk.

## Terms of Use Modifications

**Together Java** may revise these Terms of Use for **TJ-Bot** at any time without prior notice. By using the **bot**, you are agreeing to be bound by the current version of these Terms and Conditions of Use.

## Your Privacy

Please read our [Privacy Policy](https://github.com/Together-Java/TJ-Bot/blob/develop/PP.md).

## Governing Law

Any claim related to **Together Java**'s **bot** shall be governed by the laws of de without regards to its conflict of law provisions.

## Contact

People may get in contact through e-mail at [[email protected]](mailto:[email protected]), or through **Together Java**'s [official Discord](https://discord.com/invite/XXFUXzK).

Other ways of support may be provided but are not guaranteed.
7 changes: 6 additions & 1 deletion application/config.json.template
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,10 @@
]
}
],
"helpChannelPattern": "([a-zA-Z_]+_)?help(_\\d+)?"
"helpChannelPattern": "([a-zA-Z_]+_)?help(_\\d+)?",
"suggestions": {
"channelPattern": "tj_suggestions",
"upVoteEmoteName": "peepo_yes",
"downVoteEmoteName": "peepo_no"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ public static void main(final String[] args) {
}

Path configPath = Path.of(args.length == 1 ? args[0] : DEFAULT_CONFIG_PATH);
Config config;
try {
Config.load(configPath);
config = Config.load(configPath);
} catch (IOException e) {
logger.error("Unable to load the configuration file from path '{}'",
configPath.toAbsolutePath(), e);
return;
}

try {
Config config = Config.getInstance();
runBot(config.getToken(), Path.of(config.getDatabasePath()));
runBot(config);
} catch (Exception t) {
logger.error("Unknown error", t);
}
Expand All @@ -63,23 +63,24 @@ public static void main(final String[] args) {
/**
* Runs an instance of the bot, connecting to the given token and using the given database.
*
* @param token the Discord Bot token to connect with
* @param databasePath the path to the database to use
* @param config the configuration to run the bot with
*/
@SuppressWarnings("WeakerAccess")
public static void runBot(String token, Path databasePath) {
public static void runBot(Config config) {
logger.info("Starting bot...");

Path databasePath = Path.of(config.getDatabasePath());
try {
Path parentDatabasePath = databasePath.toAbsolutePath().getParent();
if (parentDatabasePath != null) {
Files.createDirectories(parentDatabasePath);
}
Database database = new Database("jdbc:sqlite:" + databasePath.toAbsolutePath());

JDA jda = JDABuilder.createDefault(token)
JDA jda = JDABuilder.createDefault(config.getToken())
.enableIntents(GatewayIntent.GUILD_MEMBERS)
.build();
jda.addEventListener(new BotCore(jda, database));
jda.addEventListener(new BotCore(jda, database, config));
jda.awaitReady();
logger.info("Bot is ready");

Expand Down
Loading