Skip to content

Commit 0d0119b

Browse files
Moved packages
1 parent a3babda commit 0d0119b

File tree

6 files changed

+7
-9
lines changed

6 files changed

+7
-9
lines changed

src/main/java/net/javadiscord/javabot/listener/UserLeaveListener.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import net.javadiscord.javabot.data.config.BotConfig;
88

99
import lombok.RequiredArgsConstructor;
10+
import org.jetbrains.annotations.NotNull;
1011

1112
/**
1213
* Listens for the {@link GuildMemberRemoveEvent}.
@@ -16,7 +17,7 @@ public class UserLeaveListener extends ListenerAdapter {
1617
private final BotConfig botConfig;
1718

1819
@Override
19-
public void onGuildMemberRemove(GuildMemberRemoveEvent event) {
20+
public void onGuildMemberRemove(@NotNull GuildMemberRemoveEvent event) {
2021
if (event.getUser().isBot() || event.getUser().isSystem()) return;
2122
if (!botConfig.get(event.getGuild()).getServerLockConfig().isLocked()) {
2223
unreserveAllChannels(event.getUser(), event.getGuild());

src/main/java/net/javadiscord/javabot/systems/help/forum/ForumHelpListener.java renamed to src/main/java/net/javadiscord/javabot/systems/help/ForumHelpListener.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package net.javadiscord.javabot.systems.help.forum;
1+
package net.javadiscord.javabot.systems.help;
22

33
import lombok.RequiredArgsConstructor;
44
import net.dv8tion.jda.api.EmbedBuilder;
@@ -21,7 +21,6 @@
2121
import net.javadiscord.javabot.data.config.guild.HelpConfig;
2222
import net.javadiscord.javabot.data.config.guild.HelpForumConfig;
2323
import net.javadiscord.javabot.data.h2db.DbActions;
24-
import net.javadiscord.javabot.systems.help.HelpExperienceService;
2524
import net.javadiscord.javabot.systems.help.dao.HelpAccountRepository;
2625
import net.javadiscord.javabot.systems.help.dao.HelpTransactionRepository;
2726
import net.javadiscord.javabot.systems.user_preferences.UserPreferenceService;

src/main/java/net/javadiscord/javabot/systems/help/forum/ForumHelpManager.java renamed to src/main/java/net/javadiscord/javabot/systems/help/ForumHelpManager.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package net.javadiscord.javabot.systems.help.forum;
1+
package net.javadiscord.javabot.systems.help;
22

33
import lombok.Getter;
44
import lombok.RequiredArgsConstructor;
@@ -19,7 +19,6 @@
1919
import net.javadiscord.javabot.data.config.guild.HelpConfig;
2020
import net.javadiscord.javabot.data.config.guild.HelpForumConfig;
2121
import net.javadiscord.javabot.data.h2db.DbActions;
22-
import net.javadiscord.javabot.systems.help.HelpExperienceService;
2322
import net.javadiscord.javabot.systems.help.dao.HelpAccountRepository;
2423
import net.javadiscord.javabot.systems.help.dao.HelpTransactionRepository;
2524
import net.javadiscord.javabot.util.ExceptionLogger;

src/main/java/net/javadiscord/javabot/systems/help/HelpExperienceJob.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ public void execute() {
3232
try {
3333
helpAccountRepository.removeExperienceFromAllAccounts(
3434
// just get the config for the first guild the bot is in, as it's not designed to work in multiple guilds anyway
35-
botConfig.get(jda.getGuilds().get(0)).getHelpConfig().getDailyExperienceSubtraction(), 100,
36-
100);
35+
botConfig.get(jda.getGuilds().get(0)).getHelpConfig().getDailyExperienceSubtraction(), 100, 100);
3736
} catch (DataAccessException e) {
3837
ExceptionLogger.capture(e, DbHelper.class.getSimpleName());
3938
}

src/main/java/net/javadiscord/javabot/systems/help/commands/UnreserveCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import net.javadiscord.javabot.data.h2db.DbActions;
1212
import net.javadiscord.javabot.systems.help.dao.HelpAccountRepository;
1313
import net.javadiscord.javabot.systems.help.dao.HelpTransactionRepository;
14-
import net.javadiscord.javabot.systems.help.forum.ForumHelpManager;
14+
import net.javadiscord.javabot.systems.help.ForumHelpManager;
1515
import net.javadiscord.javabot.util.Responses;
1616
import org.jetbrains.annotations.NotNull;
1717
import xyz.dynxsty.dih4jda.interactions.commands.application.SlashCommand;

src/main/java/net/javadiscord/javabot/systems/help/dao/HelpAccountRepository.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public int getTotalAccounts() throws DataAccessException {
101101
* @param change The amount to subtract.
102102
* @param min The minimum amount to subtract.
103103
* @param max The maximum amount to subtract.
104-
* @throws SQLException If an error occurs.
104+
* @throws DataAccessException If an error occurs.
105105
*/
106106
public void removeExperienceFromAllAccounts(double change, int min, int max) throws DataAccessException {
107107
long rows = jdbcTemplate.execute("UPDATE help_account SET experience = GREATEST(experience - LEAST(GREATEST(experience * (1 - ? / 100), ?), ?), 0)",new CallableStatementCallback<Long>() {

0 commit comments

Comments
 (0)