diff --git a/pom.xml b/pom.xml index 804255e..5028ed4 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 Hadder Hadder - 1.3.14 + 1.3.3 Hadder 2019 Hadder is a multi-purpose Discord bot. @@ -66,17 +66,17 @@ net.dv8tion JDA - 4.1.1_157 + 4.1.1_148 org.json json - 20200518 + 20190722 com.rethinkdb rethinkdb-driver - 2.4.4 + 2.4.0 org.slf4j @@ -91,12 +91,12 @@ org.kohsuke github-api - 1.112 + 1.111 com.sedmelluq lavaplayer - 1.3.49 + 1.3.47 com.fasterxml.jackson.core @@ -146,7 +146,7 @@ maven-project-info-reports-plugin - 3.1.0 + 3.0.0 diff --git a/src/main/java/com/bbn/hadder/Hadder.java b/src/main/java/com/bbn/hadder/Hadder.java index 9b26ccd..4335d3b 100644 --- a/src/main/java/com/bbn/hadder/Hadder.java +++ b/src/main/java/com/bbn/hadder/Hadder.java @@ -26,7 +26,6 @@ import com.bbn.hadder.commands.fun.*; import com.bbn.hadder.commands.settings.*; import com.bbn.hadder.commands.music.*; import com.bbn.hadder.core.*; -import com.bbn.hadder.db.Rethink; import com.bbn.hadder.listener.*; import net.dv8tion.jda.api.OnlineStatus; import net.dv8tion.jda.api.entities.Activity; @@ -53,7 +52,7 @@ public class Hadder { Rethink rethink = new Rethink(config); rethink.connect(); - DefaultShardManagerBuilder builder = DefaultShardManagerBuilder.create(GatewayIntent.getIntents(GatewayIntent.ALL_INTENTS)); + DefaultShardManagerBuilder builder = DefaultShardManagerBuilder.create(GatewayIntent.GUILD_MEMBERS, GatewayIntent.DIRECT_MESSAGE_REACTIONS, GatewayIntent.GUILD_PRESENCES, GatewayIntent.GUILD_VOICE_STATES, GatewayIntent.GUILD_EMOJIS, GatewayIntent.GUILD_MESSAGES); builder.setAutoReconnect(true); builder.setShardsTotal(1); @@ -99,6 +98,7 @@ public class Hadder { new AvatarCommand(), new EvalCommand(), new JoinCommand(), + new LeaveCommand(), new GuildLeaveCommand(), new MemeCommand(), new InviteDetectCommand(), @@ -140,8 +140,7 @@ public class Hadder { new InviteLinkListener(rethink), new RulesListener(rethink), new StarboardListener(rethink), - new VoiceLeaveListener(audioManager), - new OwnerMessageListener(config)); + new VoiceLeaveListener(audioManager)); try { shardManager = builder.build(); diff --git a/src/main/java/com/bbn/hadder/db/Rethink.java b/src/main/java/com/bbn/hadder/Rethink.java similarity index 83% rename from src/main/java/com/bbn/hadder/db/Rethink.java rename to src/main/java/com/bbn/hadder/Rethink.java index 6651a39..5f8ee59 100644 --- a/src/main/java/com/bbn/hadder/db/Rethink.java +++ b/src/main/java/com/bbn/hadder/Rethink.java @@ -14,24 +14,26 @@ * limitations under the License. */ -package com.bbn.hadder.db; +package com.bbn.hadder; import com.bbn.hadder.core.Config; import com.rethinkdb.RethinkDB; import com.rethinkdb.gen.exc.ReqlNonExistenceError; import com.rethinkdb.gen.exc.ReqlOpFailedError; import com.rethinkdb.net.Connection; +import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.lang.reflect.Field; +import java.util.NoSuchElementException; public class Rethink { private RethinkDB r = RethinkDB.r; private Connection conn; private Config config; - public Rethink(Config config) { + Rethink(Config config) { this.config = config; } @@ -50,12 +52,33 @@ public class Rethink { } } + private JSONArray getAsArray(String table, String where, String value) { + try { + String string = r.table(table).filter(row -> row.g(where.toLowerCase()).eq(value)).coerceTo("array").toJson().run(conn); + return new JSONArray(string); + } catch (NoSuchElementException e) { + return null; + } catch (Exception e) { + e.printStackTrace(); + } + return new JSONArray(); + } + + public Object get(String table, String where, String value, String column) { + JSONArray array = this.getAsArray(table, where, value); + if (array.length() > 0) + if (array.getJSONObject(0).has(column)) + return array.getJSONObject(0).get(column); + else return null; + else return null; + } + public Object getByID(String table, String where, String column) { - return r.table(table).get(where).getField(column).run(conn).first(); + return r.table(table).get(where).getField(column).run(conn); } public JSONObject getObjectByID(String table, String id) { - String response = String.valueOf(r.table(table).get(id).toJson().run(conn).first()); + String response = r.table(table).get(id).toJson().run(conn); try { return new JSONObject(response); } catch (JSONException e) { @@ -140,7 +163,7 @@ public class Rethink { } } - public void push(RethinkServer server) { + public void pushServer(RethinkServer server) { JSONObject object = new JSONObject(); for (Field field : server.getClass().getDeclaredFields()) { if (!field.getName().equals("rethink")) { @@ -154,7 +177,7 @@ public class Rethink { r.table("server").get(server.getId()).update(object.toMap()).run(conn); } - public void push(RethinkUser user) { + public void pushUser(RethinkUser user) { JSONObject object = new JSONObject(); for (Field field : user.getClass().getDeclaredFields()) { if (!field.getName().equals("rethink")) { diff --git a/src/main/java/com/bbn/hadder/db/RethinkServer.java b/src/main/java/com/bbn/hadder/RethinkServer.java similarity index 96% rename from src/main/java/com/bbn/hadder/db/RethinkServer.java rename to src/main/java/com/bbn/hadder/RethinkServer.java index 0993922..200e13a 100644 --- a/src/main/java/com/bbn/hadder/db/RethinkServer.java +++ b/src/main/java/com/bbn/hadder/RethinkServer.java @@ -10,11 +10,11 @@ * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and + * See the License for the specific language governing permissions and * limitations under the License. */ -package com.bbn.hadder.db; +package com.bbn.hadder; import org.json.JSONObject; @@ -128,6 +128,6 @@ public class RethinkServer { } public void push() { - rethink.push(this); + rethink.pushServer(this); } } diff --git a/src/main/java/com/bbn/hadder/db/RethinkUser.java b/src/main/java/com/bbn/hadder/RethinkUser.java similarity index 93% rename from src/main/java/com/bbn/hadder/db/RethinkUser.java rename to src/main/java/com/bbn/hadder/RethinkUser.java index ba65bc3..cc3b41d 100644 --- a/src/main/java/com/bbn/hadder/db/RethinkUser.java +++ b/src/main/java/com/bbn/hadder/RethinkUser.java @@ -10,11 +10,11 @@ * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and + * See the License for the specific language governing permissions and * limitations under the License. */ -package com.bbn.hadder.db; +package com.bbn.hadder; import org.json.JSONObject; @@ -76,6 +76,6 @@ public class RethinkUser { } public void push() { - rethink.push(this); + rethink.pushUser(this); } } diff --git a/src/main/java/com/bbn/hadder/commands/CommandEvent.java b/src/main/java/com/bbn/hadder/commands/CommandEvent.java index 73dc632..90b1d8b 100644 --- a/src/main/java/com/bbn/hadder/commands/CommandEvent.java +++ b/src/main/java/com/bbn/hadder/commands/CommandEvent.java @@ -16,9 +16,9 @@ package com.bbn.hadder.commands; -import com.bbn.hadder.db.Rethink; -import com.bbn.hadder.db.RethinkServer; -import com.bbn.hadder.db.RethinkUser; +import com.bbn.hadder.Rethink; +import com.bbn.hadder.RethinkServer; +import com.bbn.hadder.RethinkUser; import com.bbn.hadder.audio.AudioManager; import com.bbn.hadder.commands.general.HelpCommand; import com.bbn.hadder.core.CommandHandler; diff --git a/src/main/java/com/bbn/hadder/commands/music/LeaveCommand.java b/src/main/java/com/bbn/hadder/commands/music/LeaveCommand.java new file mode 100644 index 0000000..d63cdb1 --- /dev/null +++ b/src/main/java/com/bbn/hadder/commands/music/LeaveCommand.java @@ -0,0 +1,69 @@ +/* + * Copyright 2019-2020 GregTCLTK and Schlauer-Hax + * + * Licensed under the GNU Affero General Public License, Version 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.gnu.org/licenses/agpl-3.0.en.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.bbn.hadder.commands.music; + +import com.bbn.hadder.commands.Command; +import com.bbn.hadder.commands.CommandEvent; +import com.bbn.hadder.utils.MessageEditor; + +public class LeaveCommand implements Command { + + @Override + public void executed(String[] args, CommandEvent e) { + if (e.getGuild().getSelfMember().getVoiceState().inVoiceChannel()) { + if (e.getMember().getVoiceState().inVoiceChannel() && e.getGuild().getSelfMember().getVoiceState().getChannel().equals(e.getMember().getVoiceState().getChannel())) { + e.getGuild().getAudioManager().closeAudioConnection(); + e.getTextChannel().sendMessage(e.getMessageEditor().getMessage( + MessageEditor.MessageType.INFO, + "commands.music.leave.success.title", + "commands.music.leave.success.description") + .build()).queue(); + } else { + e.getTextChannel().sendMessage(e.getMessageEditor().getMessage(MessageEditor.MessageType.ERROR, + "commands.music.leave.error.channel.title", + "commands.music.leave.error.channel.description") + .build()).queue(); + } + } else { + e.getTextChannel().sendMessage(e.getMessageEditor().getMessage( + MessageEditor.MessageType.ERROR, + "commands.music.leave.error.connected.tile", + "commands.music.leave.error.connected.description") + .build()).queue(); + } + } + + @Override + public String[] labels() { + return new String[]{"leave", "quit"}; + } + + @Override + public String description() { + return "commands.music.leave.help.description"; + } + + @Override + public String usage() { + return null; + } + + @Override + public String example() { + return null; + } +} diff --git a/src/main/java/com/bbn/hadder/commands/music/SkipCommand.java b/src/main/java/com/bbn/hadder/commands/music/SkipCommand.java index f7bd31c..be1a5b1 100644 --- a/src/main/java/com/bbn/hadder/commands/music/SkipCommand.java +++ b/src/main/java/com/bbn/hadder/commands/music/SkipCommand.java @@ -26,14 +26,10 @@ public class SkipCommand implements Command { public void executed(String[] args, CommandEvent e) { if (e.getAudioManager().hasPlayer(e.getGuild()) && !e.getAudioManager().getTrackManager(e.getGuild()).getQueuedTracks().isEmpty()) { if (e.getMember().getVoiceState().inVoiceChannel() && e.getGuild().getSelfMember().getVoiceState().inVoiceChannel() && e.getGuild().getSelfMember().getVoiceState().getChannel().equals(e.getMember().getVoiceState().getChannel())) { - if (!e.getAudioManager().getTrackManager(e.getGuild()).isLoop()) { - e.getAudioManager().forceSkipTrack(e); - e.getTextChannel().sendMessage(e.getMessageEditor().getMessage(MessageEditor.MessageType.INFO, - "commands.music.skip.success.title", - "commands.music.skip.success.description").build()).queue(); - } else { - e.getTextChannel().sendMessage("Get rekt lol Mach Loop aus noob").queue(); - } + e.getAudioManager().forceSkipTrack(e); + e.getTextChannel().sendMessage(e.getMessageEditor().getMessage(MessageEditor.MessageType.INFO, + "commands.music.skip.success.title", + "commands.music.skip.success.description").build()).queue(); } else { e.getTextChannel().sendMessage(e.getMessageEditor().getMessage(MessageEditor.MessageType.ERROR, "commands.music.skip.error.connected.title", diff --git a/src/main/java/com/bbn/hadder/commands/music/StopCommand.java b/src/main/java/com/bbn/hadder/commands/music/StopCommand.java index 96a1811..e11dfac 100644 --- a/src/main/java/com/bbn/hadder/commands/music/StopCommand.java +++ b/src/main/java/com/bbn/hadder/commands/music/StopCommand.java @@ -26,7 +26,6 @@ public class StopCommand implements Command { public void executed(String[] args, CommandEvent e) { if (e.getAudioManager().hasPlayer(e.getGuild()) && e.getAudioManager().getPlayer(e.getGuild()).getPlayingTrack() != null) { if (e.getMember().getVoiceState().inVoiceChannel() && e.getGuild().getSelfMember().getVoiceState().inVoiceChannel() && e.getGuild().getSelfMember().getVoiceState().getChannel().equals(e.getMember().getVoiceState().getChannel())) { - e.getAudioManager().getTrackManager(e.getGuild()).setLoop(false); e.getAudioManager().players.remove(e.getGuild().getId()); e.getAudioManager().getPlayer(e.getGuild()).destroy(); e.getAudioManager().getTrackManager(e.getGuild()).purgeQueue(); @@ -49,7 +48,7 @@ public class StopCommand implements Command { @Override public String[] labels() { - return new String[]{"stop", "leave"}; + return new String[]{"stop"}; } @Override diff --git a/src/main/java/com/bbn/hadder/commands/owner/BlacklistCommand.java b/src/main/java/com/bbn/hadder/commands/owner/BlacklistCommand.java index b097af1..5724fa0 100644 --- a/src/main/java/com/bbn/hadder/commands/owner/BlacklistCommand.java +++ b/src/main/java/com/bbn/hadder/commands/owner/BlacklistCommand.java @@ -16,7 +16,7 @@ package com.bbn.hadder.commands.owner; -import com.bbn.hadder.db.RethinkUser; +import com.bbn.hadder.RethinkUser; import com.bbn.hadder.commands.Command; import com.bbn.hadder.commands.CommandEvent; import com.bbn.hadder.core.Perm; @@ -39,14 +39,12 @@ public class BlacklistCommand implements Command { } else { switch (args[0].toLowerCase()) { case "add": - case "remove": if (args.length == 3 && e.getMessage().getMentionedUsers().size() == 1) { RethinkUser u = new RethinkUser(e.getRethink().getObjectByID("user", e.getMessage().getMentionedUsers().get(0).getId()), e.getRethink()); String blacklisted = e.getRethinkUser().getBlacklisted(); List commands = new ArrayList<>(); if (!"none".equals(blacklisted)) commands.addAll(Arrays.asList(blacklisted.split(","))); - if (args[0].toLowerCase().equals("add")) commands.addAll(Arrays.asList(args[1].split(","))); - else commands.removeAll(Arrays.asList(args[1].split(","))); + commands.addAll(Arrays.asList(args[1].split(","))); LinkedHashSet hashSet = new LinkedHashSet<>(commands); ArrayList commandsWithoutDuplicates = new ArrayList<>(hashSet); @@ -54,8 +52,29 @@ public class BlacklistCommand implements Command { u.setBlacklisted(newblacklisted); e.getTextChannel().sendMessage( e.getMessageEditor().getMessage(MessageEditor.MessageType.INFO, - "commands.owner.blacklist.success."+args[0].toLowerCase()+".title", "", - "commands.owner.blacklist.success."+args[0].toLowerCase()+".description", newblacklisted) + "commands.owner.blacklist.success.add.title", "", + "commands.owner.blacklist.success.add.description", newblacklisted) + .build()).queue(); + u.push(); + } else e.getHelpCommand().sendHelp(this, e); + break; + + case "remove": + if (args.length == 3 && e.getMessage().getMentionedUsers().size() == 1) { + RethinkUser u = new RethinkUser(e.getRethink().getObjectByID("user", e.getMessage().getMentionedUsers().get(0).getId()), e.getRethink()); + String blacklisted = e.getRethinkUser().getBlacklisted(); + List commands = new ArrayList<>(); + if (!"none".equals(blacklisted)) commands.addAll(Arrays.asList(blacklisted.split(","))); + commands.removeAll(Arrays.asList(args[1].split(","))); + LinkedHashSet hashSet = new LinkedHashSet<>(commands); + + ArrayList commandsWithoutDuplicates = new ArrayList<>(hashSet); + String newblacklisted = ((commandsWithoutDuplicates.size()!=0) ? String.join(",", commandsWithoutDuplicates) : "none"); + u.setBlacklisted(newblacklisted); + e.getTextChannel().sendMessage( + e.getMessageEditor().getMessage(MessageEditor.MessageType.INFO, + "commands.owner.blacklist.success.remove.title", "", + "commands.owner.blacklist.success.remove.description", newblacklisted) .build()).queue(); u.push(); } else e.getHelpCommand().sendHelp(this, e); diff --git a/src/main/java/com/bbn/hadder/core/CommandHandler.java b/src/main/java/com/bbn/hadder/core/CommandHandler.java index a5ecd97..7ab130a 100644 --- a/src/main/java/com/bbn/hadder/core/CommandHandler.java +++ b/src/main/java/com/bbn/hadder/core/CommandHandler.java @@ -16,9 +16,9 @@ package com.bbn.hadder.core; -import com.bbn.hadder.db.Rethink; -import com.bbn.hadder.db.RethinkServer; -import com.bbn.hadder.db.RethinkUser; +import com.bbn.hadder.Rethink; +import com.bbn.hadder.RethinkServer; +import com.bbn.hadder.RethinkUser; import com.bbn.hadder.audio.AudioManager; import com.bbn.hadder.commands.Command; import com.bbn.hadder.commands.CommandEvent; diff --git a/src/main/java/com/bbn/hadder/listener/CommandListener.java b/src/main/java/com/bbn/hadder/listener/CommandListener.java index 0defad9..286d320 100644 --- a/src/main/java/com/bbn/hadder/listener/CommandListener.java +++ b/src/main/java/com/bbn/hadder/listener/CommandListener.java @@ -16,9 +16,9 @@ package com.bbn.hadder.listener; -import com.bbn.hadder.db.Rethink; -import com.bbn.hadder.db.RethinkServer; -import com.bbn.hadder.db.RethinkUser; +import com.bbn.hadder.Rethink; +import com.bbn.hadder.RethinkServer; +import com.bbn.hadder.RethinkUser; import com.bbn.hadder.audio.AudioManager; import com.bbn.hadder.core.CommandHandler; import net.dv8tion.jda.api.EmbedBuilder; diff --git a/src/main/java/com/bbn/hadder/listener/GuildListener.java b/src/main/java/com/bbn/hadder/listener/GuildListener.java index a35ce21..91204ca 100644 --- a/src/main/java/com/bbn/hadder/listener/GuildListener.java +++ b/src/main/java/com/bbn/hadder/listener/GuildListener.java @@ -16,7 +16,7 @@ package com.bbn.hadder.listener; -import com.bbn.hadder.db.Rethink; +import com.bbn.hadder.Rethink; import com.bbn.hadder.core.Config; import com.bbn.hadder.utils.BotList; import com.bbn.hadder.utils.MessageEditor; diff --git a/src/main/java/com/bbn/hadder/listener/InviteLinkListener.java b/src/main/java/com/bbn/hadder/listener/InviteLinkListener.java index 69dddfd..ea00e93 100644 --- a/src/main/java/com/bbn/hadder/listener/InviteLinkListener.java +++ b/src/main/java/com/bbn/hadder/listener/InviteLinkListener.java @@ -16,8 +16,8 @@ package com.bbn.hadder.listener; -import com.bbn.hadder.db.Rethink; -import com.bbn.hadder.db.RethinkServer; +import com.bbn.hadder.Rethink; +import com.bbn.hadder.RethinkServer; import net.dv8tion.jda.api.Permission; import net.dv8tion.jda.api.entities.ChannelType; import net.dv8tion.jda.api.entities.Message; diff --git a/src/main/java/com/bbn/hadder/listener/MentionListener.java b/src/main/java/com/bbn/hadder/listener/MentionListener.java index 2ac4e3d..7fb9e11 100644 --- a/src/main/java/com/bbn/hadder/listener/MentionListener.java +++ b/src/main/java/com/bbn/hadder/listener/MentionListener.java @@ -16,9 +16,9 @@ package com.bbn.hadder.listener; -import com.bbn.hadder.db.Rethink; -import com.bbn.hadder.db.RethinkServer; -import com.bbn.hadder.db.RethinkUser; +import com.bbn.hadder.Rethink; +import com.bbn.hadder.RethinkServer; +import com.bbn.hadder.RethinkUser; import net.dv8tion.jda.api.EmbedBuilder; import net.dv8tion.jda.api.entities.ChannelType; import net.dv8tion.jda.api.events.message.MessageReceivedEvent; diff --git a/src/main/java/com/bbn/hadder/listener/OwnerMessageListener.java b/src/main/java/com/bbn/hadder/listener/OwnerMessageListener.java deleted file mode 100644 index 010c531..0000000 --- a/src/main/java/com/bbn/hadder/listener/OwnerMessageListener.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * @author Hax / Hax6775 / Schlauer_Hax - */ - -package com.bbn.hadder.listener; - -import com.bbn.hadder.core.Config; -import com.bbn.hadder.core.Perms; -import net.dv8tion.jda.api.entities.Emote; -import net.dv8tion.jda.api.events.message.MessageReceivedEvent; -import net.dv8tion.jda.api.hooks.ListenerAdapter; -import org.json.JSONObject; - -import javax.annotation.Nonnull; - -public class OwnerMessageListener extends ListenerAdapter { - - Config config; - - public OwnerMessageListener(Config config) { - this.config = config; - } - - @Override - public void onMessageReceived(@Nonnull MessageReceivedEvent event) { - if (config.getOwners().contains(event.getAuthor().getIdLong()) && event.getMessage().getContentRaw().startsWith(":") && event.getMessage().getContentRaw().endsWith(":")) { - String emotename = event.getMessage().getContentRaw().split(":")[1]; - if (!emotename.contains(" ")) { - Emote[] emotes = event.getJDA().getEmotesByName(emotename, true).toArray(new Emote[0]); - StringBuilder sb = new StringBuilder(); - if (emotes.length!=0) { - for (Emote emote : emotes) { - sb.append(emote.getAsMention()).append(" "); - } - event.getChannel().sendMessage(sb.toString()).queue(); - } - } - } - } -} diff --git a/src/main/java/com/bbn/hadder/listener/PrivateMessageListener.java b/src/main/java/com/bbn/hadder/listener/PrivateMessageListener.java index 8e94bbe..fc258f9 100644 --- a/src/main/java/com/bbn/hadder/listener/PrivateMessageListener.java +++ b/src/main/java/com/bbn/hadder/listener/PrivateMessageListener.java @@ -16,8 +16,8 @@ package com.bbn.hadder.listener; -import com.bbn.hadder.db.Rethink; -import com.bbn.hadder.db.RethinkUser; +import com.bbn.hadder.Rethink; +import com.bbn.hadder.RethinkUser; import com.bbn.hadder.utils.MessageEditor; import net.dv8tion.jda.api.EmbedBuilder; import net.dv8tion.jda.api.entities.ChannelType; diff --git a/src/main/java/com/bbn/hadder/listener/ReadyListener.java b/src/main/java/com/bbn/hadder/listener/ReadyListener.java index 2262453..51b3491 100644 --- a/src/main/java/com/bbn/hadder/listener/ReadyListener.java +++ b/src/main/java/com/bbn/hadder/listener/ReadyListener.java @@ -16,7 +16,7 @@ package com.bbn.hadder.listener; -import com.bbn.hadder.db.Rethink; +import com.bbn.hadder.Rethink; import com.bbn.hadder.core.Config; import com.bbn.hadder.utils.BotList; import net.dv8tion.jda.api.entities.Guild; diff --git a/src/main/java/com/bbn/hadder/listener/RulesListener.java b/src/main/java/com/bbn/hadder/listener/RulesListener.java index a04662f..8ee5fc4 100644 --- a/src/main/java/com/bbn/hadder/listener/RulesListener.java +++ b/src/main/java/com/bbn/hadder/listener/RulesListener.java @@ -16,8 +16,8 @@ package com.bbn.hadder.listener; -import com.bbn.hadder.db.Rethink; -import com.bbn.hadder.db.RethinkServer; +import com.bbn.hadder.Rethink; +import com.bbn.hadder.RethinkServer; import net.dv8tion.jda.api.events.message.react.MessageReactionAddEvent; import net.dv8tion.jda.api.events.message.react.MessageReactionRemoveEvent; import net.dv8tion.jda.api.hooks.ListenerAdapter; diff --git a/src/main/java/com/bbn/hadder/listener/StarboardListener.java b/src/main/java/com/bbn/hadder/listener/StarboardListener.java index 060777b..2467ad5 100644 --- a/src/main/java/com/bbn/hadder/listener/StarboardListener.java +++ b/src/main/java/com/bbn/hadder/listener/StarboardListener.java @@ -16,8 +16,8 @@ package com.bbn.hadder.listener; -import com.bbn.hadder.db.Rethink; -import com.bbn.hadder.db.RethinkServer; +import com.bbn.hadder.Rethink; +import com.bbn.hadder.RethinkServer; import net.dv8tion.jda.api.EmbedBuilder; import net.dv8tion.jda.api.MessageBuilder; import net.dv8tion.jda.api.entities.MessageReaction; diff --git a/src/main/java/com/bbn/hadder/utils/MessageEditor.java b/src/main/java/com/bbn/hadder/utils/MessageEditor.java index aac0d8c..c760b70 100644 --- a/src/main/java/com/bbn/hadder/utils/MessageEditor.java +++ b/src/main/java/com/bbn/hadder/utils/MessageEditor.java @@ -16,7 +16,7 @@ package com.bbn.hadder.utils; -import com.bbn.hadder.db.RethinkUser; +import com.bbn.hadder.RethinkUser; import net.dv8tion.jda.api.EmbedBuilder; import net.dv8tion.jda.api.entities.User; diff --git a/src/main/resources/Translations/Translations_de.properties b/src/main/resources/Translations/Translations_de.properties index 6322a4d..58503a4 100644 --- a/src/main/resources/Translations/Translations_de.properties +++ b/src/main/resources/Translations/Translations_de.properties @@ -223,13 +223,6 @@ commands.music.join.error.channel.description = Du befindest dich nicht in einem commands.music.join.error.permission.title = Keine Berechtigung commands.music.join.error.permission.description = Ich bin nicht Berechtigt deinem Sprachkanal beizutreten. commands.music.join.help.description = Tritt deinem Sprachkanal bei. -commands.music.leave.success.title = Verbindung erfolgreich getrennt -commands.music.leave.success.description = Ich habe die Verbindung zum Sprachkanal erfolgreich getrennt -commands.music.leave.error.channel.title = Kein Kanal -commands.music.leave.error.channel.description = Du musst im selben Sprachkanal wie der Bot sein. -commands.music.leave.error.connected.tile = Nicht verbunden -commands.music.leave.error.connected.description = Ich bin derzeit in keinem Sprachkanal auf diesem Server -commands.music.leave.help.description = Verlässt einen Sprachkanal. commands.music.play.load.title = %extra% Now loading %extra% commands.music.play.load.description = Versuche das Lied zu laden... commands.music.play.success.loading.title = %extra% Jetzt läuft %extra% diff --git a/src/main/resources/Translations/Translations_es.properties b/src/main/resources/Translations/Translations_es.properties index 043a3f1..a68515b 100644 --- a/src/main/resources/Translations/Translations_es.properties +++ b/src/main/resources/Translations/Translations_es.properties @@ -223,13 +223,6 @@ commands.music.join.error.channel.description = You aren't in a Voice Channel. commands.music.join.error.permission.title = No permission commands.music.join.error.permission.description = I am not allowed to join your voice channel. commands.music.join.help.description = Joins your voice channel. -commands.music.leave.success.title = Successfully disconnected -commands.music.leave.success.description = I successfully disconnected from the Voice Channel -commands.music.leave.error.channel.title = No channel -commands.music.leave.error.channel.description = You have to be in the same voice channel as the bot. -commands.music.leave.error.connected.tile = Not connected -commands.music.leave.error.connected.description = I'm currently in no Voice Channel on this Guild -commands.music.leave.help.description = Leaves your voice channel. commands.music.play.load.title = %extra% Now loading %extra% commands.music.play.load.description = Trying to load the song... commands.music.play.success.loading.title = %extra% Now playing %extra% diff --git a/src/main/resources/Translations/Translations_fr.properties b/src/main/resources/Translations/Translations_fr.properties index 043a3f1..a68515b 100644 --- a/src/main/resources/Translations/Translations_fr.properties +++ b/src/main/resources/Translations/Translations_fr.properties @@ -223,13 +223,6 @@ commands.music.join.error.channel.description = You aren't in a Voice Channel. commands.music.join.error.permission.title = No permission commands.music.join.error.permission.description = I am not allowed to join your voice channel. commands.music.join.help.description = Joins your voice channel. -commands.music.leave.success.title = Successfully disconnected -commands.music.leave.success.description = I successfully disconnected from the Voice Channel -commands.music.leave.error.channel.title = No channel -commands.music.leave.error.channel.description = You have to be in the same voice channel as the bot. -commands.music.leave.error.connected.tile = Not connected -commands.music.leave.error.connected.description = I'm currently in no Voice Channel on this Guild -commands.music.leave.help.description = Leaves your voice channel. commands.music.play.load.title = %extra% Now loading %extra% commands.music.play.load.description = Trying to load the song... commands.music.play.success.loading.title = %extra% Now playing %extra% diff --git a/src/main/resources/Translations/Translations_ru.properties b/src/main/resources/Translations/Translations_ru.properties index 043a3f1..a68515b 100644 --- a/src/main/resources/Translations/Translations_ru.properties +++ b/src/main/resources/Translations/Translations_ru.properties @@ -223,13 +223,6 @@ commands.music.join.error.channel.description = You aren't in a Voice Channel. commands.music.join.error.permission.title = No permission commands.music.join.error.permission.description = I am not allowed to join your voice channel. commands.music.join.help.description = Joins your voice channel. -commands.music.leave.success.title = Successfully disconnected -commands.music.leave.success.description = I successfully disconnected from the Voice Channel -commands.music.leave.error.channel.title = No channel -commands.music.leave.error.channel.description = You have to be in the same voice channel as the bot. -commands.music.leave.error.connected.tile = Not connected -commands.music.leave.error.connected.description = I'm currently in no Voice Channel on this Guild -commands.music.leave.help.description = Leaves your voice channel. commands.music.play.load.title = %extra% Now loading %extra% commands.music.play.load.description = Trying to load the song... commands.music.play.success.loading.title = %extra% Now playing %extra% diff --git a/src/main/resources/Translations/Translations_tr.properties b/src/main/resources/Translations/Translations_tr.properties index 043a3f1..a68515b 100644 --- a/src/main/resources/Translations/Translations_tr.properties +++ b/src/main/resources/Translations/Translations_tr.properties @@ -223,13 +223,6 @@ commands.music.join.error.channel.description = You aren't in a Voice Channel. commands.music.join.error.permission.title = No permission commands.music.join.error.permission.description = I am not allowed to join your voice channel. commands.music.join.help.description = Joins your voice channel. -commands.music.leave.success.title = Successfully disconnected -commands.music.leave.success.description = I successfully disconnected from the Voice Channel -commands.music.leave.error.channel.title = No channel -commands.music.leave.error.channel.description = You have to be in the same voice channel as the bot. -commands.music.leave.error.connected.tile = Not connected -commands.music.leave.error.connected.description = I'm currently in no Voice Channel on this Guild -commands.music.leave.help.description = Leaves your voice channel. commands.music.play.load.title = %extra% Now loading %extra% commands.music.play.load.description = Trying to load the song... commands.music.play.success.loading.title = %extra% Now playing %extra% diff --git a/src/main/resources/Translations/Translations_zh.properties b/src/main/resources/Translations/Translations_zh.properties index 043a3f1..a68515b 100644 --- a/src/main/resources/Translations/Translations_zh.properties +++ b/src/main/resources/Translations/Translations_zh.properties @@ -223,13 +223,6 @@ commands.music.join.error.channel.description = You aren't in a Voice Channel. commands.music.join.error.permission.title = No permission commands.music.join.error.permission.description = I am not allowed to join your voice channel. commands.music.join.help.description = Joins your voice channel. -commands.music.leave.success.title = Successfully disconnected -commands.music.leave.success.description = I successfully disconnected from the Voice Channel -commands.music.leave.error.channel.title = No channel -commands.music.leave.error.channel.description = You have to be in the same voice channel as the bot. -commands.music.leave.error.connected.tile = Not connected -commands.music.leave.error.connected.description = I'm currently in no Voice Channel on this Guild -commands.music.leave.help.description = Leaves your voice channel. commands.music.play.load.title = %extra% Now loading %extra% commands.music.play.load.description = Trying to load the song... commands.music.play.success.loading.title = %extra% Now playing %extra%