Skip to content

Commit 1693487

Browse files
Release 1.15.0 (#586)
2 parents 1fd6c0e + 4d0ae9d commit 1693487

File tree

26 files changed

+331
-97
lines changed

26 files changed

+331
-97
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v4
12-
- uses: actions/setup-python@v4
12+
- uses: actions/setup-python@v5
1313
with:
1414
python-version: 3.11
1515
- run: pip install pipenv && pipenv install && pipenv run mkdocs gh-deploy --force

.github/workflows/verify.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848

4949
steps:
5050
- uses: actions/checkout@v4
51-
- uses: actions/setup-python@v4
51+
- uses: actions/setup-python@v5
5252
with:
5353
python-version: 3.11
5454
- run: pip install pipenv && pipenv install && pipenv run mkdocs build

build.gradle.kts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ plugins {
88
}
99

1010
group = "de.chojo"
11-
version = "1.14.0"
11+
version = "1.15.0"
1212

1313
repositories {
1414
maven("https://eldonexus.de/repository/maven-public")
@@ -25,12 +25,12 @@ spotless {
2525

2626
dependencies {
2727
//discord
28-
implementation("de.chojo", "cjda-util", "2.8.6+beta.11") {
28+
implementation("de.chojo", "cjda-util", "2.9.3+beta.19") {
2929
exclude(group = "club.minnced", module = "opus-java")
3030
}
3131

3232
// database
33-
implementation("org.postgresql", "postgresql", "42.7.0")
33+
implementation("org.postgresql", "postgresql", "42.7.1")
3434
implementation(libs.bundles.sadu)
3535

3636
// Logging
@@ -39,12 +39,12 @@ dependencies {
3939
exclude("org.apache.logging.log4j")
4040
}
4141

42-
implementation("org.knowm.xchart", "xchart", "3.8.6")
42+
implementation("org.knowm.xchart", "xchart", "3.8.7")
4343

4444
// unit testing
4545
testImplementation(platform("org.junit:junit-bom:5.10.1"))
4646
testImplementation("org.junit.jupiter", "junit-jupiter")
47-
testImplementation("org.knowm.xchart", "xchart", "3.8.6")
47+
testImplementation("org.knowm.xchart", "xchart", "3.8.7")
4848
}
4949

5050
java {

settings.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
rootProject.name = "rep-bot"
22

33
plugins {
4-
id("org.gradle.toolchains.foojay-resolver-convention") version("0.7.0")
4+
id("org.gradle.toolchains.foojay-resolver-convention") version("0.8.0")
55
}
66

77
dependencyResolutionManagement {
@@ -15,15 +15,15 @@ dependencyResolutionManagement {
1515
library("sadu-datasource", "de.chojo.sadu", "sadu-datasource").versionRef("sadu")
1616
bundle("sadu", listOf("sadu-queries", "sadu-updater", "sadu-postgresql", "sadu-datasource"))
1717

18-
version("log4j", "2.22.0")
19-
library("slf4j-api", "org.slf4j:slf4j-api:2.0.9")
18+
version("log4j", "2.22.1")
19+
library("slf4j-api", "org.slf4j:slf4j-api:2.0.11")
2020
library("log4j-core", "org.apache.logging.log4j", "log4j-core").versionRef("log4j")
2121
library("log4j-slf4j2", "org.apache.logging.log4j", "log4j-slf4j2-impl").versionRef("log4j")
2222
library("log4j-jsontemplate","org.apache.logging.log4j", "log4j-layout-template-json").versionRef("log4j")
2323
bundle("log4j", listOf("slf4j-api", "log4j-core", "log4j-slf4j2", "log4j-jsontemplate"))
2424

2525
// plugins
26-
plugin("spotless", "com.diffplug.spotless").version("6.23.2")
26+
plugin("spotless", "com.diffplug.spotless").version("6.24.0")
2727
plugin("shadow", "com.github.johnrengelman.shadow").version("8.1.1")
2828

2929
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* SPDX-License-Identifier: AGPL-3.0-only
3+
*
4+
* Copyright (C) RainbowDashLabs and Contributor
5+
*/
6+
package de.chojo.repbot.actions.messages.log;
7+
8+
import de.chojo.jdautil.interactions.message.Message;
9+
import de.chojo.jdautil.interactions.message.provider.MessageProvider;
10+
import de.chojo.repbot.actions.messages.log.handler.MessageAnalyzer;
11+
import de.chojo.repbot.dao.provider.Guilds;
12+
import net.dv8tion.jda.api.Permission;
13+
14+
public class MessageLog implements MessageProvider<Message> {
15+
private final Guilds guilds;
16+
17+
public MessageLog(Guilds guilds) {
18+
this.guilds = guilds;
19+
}
20+
21+
@Override
22+
public Message message() {
23+
return Message.of("Message Log")
24+
.handler(new MessageAnalyzer(guilds))
25+
.setGuildOnly(true)
26+
.withPermission(Permission.MESSAGE_MANAGE)
27+
.build();
28+
}
29+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* SPDX-License-Identifier: AGPL-3.0-only
3+
*
4+
* Copyright (C) RainbowDashLabs and Contributor
5+
*/
6+
package de.chojo.repbot.actions.messages.log.handler;
7+
8+
import de.chojo.jdautil.interactions.message.MessageHandler;
9+
import de.chojo.jdautil.wrapper.EventContext;
10+
import de.chojo.repbot.commands.log.handler.Analyzer;
11+
import de.chojo.repbot.dao.provider.Guilds;
12+
import net.dv8tion.jda.api.events.interaction.command.MessageContextInteractionEvent;
13+
14+
public class MessageAnalyzer implements MessageHandler {
15+
private final Guilds guilds;
16+
17+
public MessageAnalyzer(Guilds guilds) {
18+
this.guilds = guilds;
19+
}
20+
21+
@Override
22+
public void onMessage(MessageContextInteractionEvent event, EventContext eventContext) {
23+
Analyzer.sendAnalyzerLog(event, guilds, event.getTarget().getIdLong(), eventContext);
24+
}
25+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* SPDX-License-Identifier: AGPL-3.0-only
3+
*
4+
* Copyright (C) RainbowDashLabs and Contributor
5+
*/
6+
package de.chojo.repbot.actions.user.donated.received;
7+
8+
import de.chojo.jdautil.interactions.user.User;
9+
import de.chojo.jdautil.interactions.user.provider.UserProvider;
10+
import de.chojo.repbot.actions.user.donated.received.handler.DonatedReputation;
11+
import de.chojo.repbot.dao.provider.Guilds;
12+
import net.dv8tion.jda.api.Permission;
13+
14+
public class UserDonated implements UserProvider<User> {
15+
private final Guilds guilds;
16+
17+
public UserDonated(Guilds guilds) {
18+
this.guilds = guilds;
19+
}
20+
21+
@Override
22+
public User user() {
23+
return User.of("Given Reputation").handler(new DonatedReputation(guilds))
24+
.setGuildOnly(true)
25+
.withPermission(Permission.MESSAGE_MANAGE)
26+
.build();
27+
}
28+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* SPDX-License-Identifier: AGPL-3.0-only
3+
*
4+
* Copyright (C) RainbowDashLabs and Contributor
5+
*/
6+
package de.chojo.repbot.actions.user.donated.received.handler;
7+
8+
import de.chojo.jdautil.interactions.user.UserHandler;
9+
import de.chojo.jdautil.wrapper.EventContext;
10+
import de.chojo.repbot.commands.log.handler.Donated;
11+
import de.chojo.repbot.commands.log.handler.Received;
12+
import de.chojo.repbot.dao.provider.Guilds;
13+
import net.dv8tion.jda.api.events.interaction.command.UserContextInteractionEvent;
14+
15+
public class DonatedReputation implements UserHandler {
16+
private final Guilds guilds;
17+
18+
public DonatedReputation(Guilds guilds) {
19+
this.guilds = guilds;
20+
}
21+
22+
23+
@Override
24+
public void onUser(UserContextInteractionEvent event, EventContext eventContext) {
25+
Donated.send(event, event.getTargetMember(), guilds, eventContext);
26+
}
27+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* SPDX-License-Identifier: AGPL-3.0-only
3+
*
4+
* Copyright (C) RainbowDashLabs and Contributor
5+
*/
6+
package de.chojo.repbot.actions.user.received;
7+
8+
import de.chojo.jdautil.interactions.user.User;
9+
import de.chojo.jdautil.interactions.user.provider.UserProvider;
10+
import de.chojo.repbot.actions.user.received.handler.ReceivedReputation;
11+
import de.chojo.repbot.dao.provider.Guilds;
12+
import net.dv8tion.jda.api.Permission;
13+
14+
public class UserReceived implements UserProvider<User> {
15+
private final Guilds guilds;
16+
17+
public UserReceived(Guilds guilds) {
18+
this.guilds = guilds;
19+
}
20+
21+
@Override
22+
public User user() {
23+
return User.of("Received Reputation").handler(new ReceivedReputation(guilds))
24+
.setGuildOnly(true)
25+
.withPermission(Permission.MESSAGE_MANAGE)
26+
.build();
27+
}
28+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* SPDX-License-Identifier: AGPL-3.0-only
3+
*
4+
* Copyright (C) RainbowDashLabs and Contributor
5+
*/
6+
package de.chojo.repbot.actions.user.received.handler;
7+
8+
import de.chojo.jdautil.interactions.user.UserHandler;
9+
import de.chojo.jdautil.wrapper.EventContext;
10+
import de.chojo.repbot.commands.log.handler.Received;
11+
import de.chojo.repbot.dao.provider.Guilds;
12+
import net.dv8tion.jda.api.events.interaction.command.UserContextInteractionEvent;
13+
14+
public class ReceivedReputation implements UserHandler {
15+
private final Guilds guilds;
16+
17+
public ReceivedReputation(Guilds guilds) {
18+
this.guilds = guilds;
19+
}
20+
21+
22+
@Override
23+
public void onUser(UserContextInteractionEvent event, EventContext eventContext) {
24+
Received.send(event, event.getTargetMember(), guilds, eventContext);
25+
}
26+
}

0 commit comments

Comments
 (0)