From 92e28ead122b1a841b9e6cd6f2b77952c5ec5ea9 Mon Sep 17 00:00:00 2001 From: GregTCLTK Date: Sat, 7 Dec 2019 10:23:15 +0100 Subject: [PATCH 01/24] ressources folder is back --- src/main/{java => resources}/META-INF/MANIFEST.MF | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/main/{java => resources}/META-INF/MANIFEST.MF (100%) diff --git a/src/main/java/META-INF/MANIFEST.MF b/src/main/resources/META-INF/MANIFEST.MF similarity index 100% rename from src/main/java/META-INF/MANIFEST.MF rename to src/main/resources/META-INF/MANIFEST.MF From 562f520dfa463a634ebdede042d7b09dce0c0dcf Mon Sep 17 00:00:00 2001 From: GregTCLTK Date: Sat, 7 Dec 2019 12:09:53 +0100 Subject: [PATCH 02/24] Language command --- src/main/java/com/bbn/hadder/Hadder.java | 1 + src/main/java/com/bbn/hadder/Rethink.java | 4 ++ .../commands/settings/LanguageCommand.java | 44 +++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 src/main/java/com/bbn/hadder/commands/settings/LanguageCommand.java diff --git a/src/main/java/com/bbn/hadder/Hadder.java b/src/main/java/com/bbn/hadder/Hadder.java index c17982b..b4f0ad9 100644 --- a/src/main/java/com/bbn/hadder/Hadder.java +++ b/src/main/java/com/bbn/hadder/Hadder.java @@ -87,6 +87,7 @@ public class Hadder { new SoloCommand(), new RegionChangeCommand(), new AboutCommand(), + new LanguageCommand(), new LinkCommand()), config, helpCommand); builder.addEventListeners( diff --git a/src/main/java/com/bbn/hadder/Rethink.java b/src/main/java/com/bbn/hadder/Rethink.java index caf380f..f9e0edb 100644 --- a/src/main/java/com/bbn/hadder/Rethink.java +++ b/src/main/java/com/bbn/hadder/Rethink.java @@ -185,4 +185,8 @@ public class Rethink { return (Boolean) this.get("server", "id", guild_id, "invite_detect"); } + public void setLanguage(String user_id, String language) { + this.update("users", user_id, "language", language); + } + } diff --git a/src/main/java/com/bbn/hadder/commands/settings/LanguageCommand.java b/src/main/java/com/bbn/hadder/commands/settings/LanguageCommand.java new file mode 100644 index 0000000..0357cf5 --- /dev/null +++ b/src/main/java/com/bbn/hadder/commands/settings/LanguageCommand.java @@ -0,0 +1,44 @@ +package com.bbn.hadder.commands.settings; + +/* + * @author Skidder / GregTCLTK + */ + +import com.bbn.hadder.commands.Command; +import com.bbn.hadder.commands.CommandEvent; +import com.bbn.hadder.utils.MessageEditor; + +public class LanguageCommand implements Command { + + @Override + public void executed(String[] args, CommandEvent event) { + if (args.length == 1) { + switch (args[0].toLowerCase()) { + case "DE": + event.getRethink().setLanguage(event.getAuthor().getId(), "DE"); + event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) + .setTitle("Language set") + .setDescription("German is your new language now.") + .build()).queue(); + break; + } + } else { + event.getHelpCommand().sendHelp(this, event.getRethink(), event.getAuthor(), event.getTextChannel()); + } + } + + @Override + public String[] labels() { + return new String[]{"language"}; + } + + @Override + public String description() { + return "Sets the new primary language for a user."; + } + + @Override + public String usage() { + return ""; + } +} From 27443316be67acdabbc797a39bad9b6644467a7c Mon Sep 17 00:00:00 2001 From: GregTCLTK Date: Sat, 7 Dec 2019 20:00:27 +0100 Subject: [PATCH 03/24] Join Command more error messages --- src/main/java/com/bbn/hadder/Rethink.java | 2 +- .../java/com/bbn/hadder/commands/music/JoinCommand.java | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/bbn/hadder/Rethink.java b/src/main/java/com/bbn/hadder/Rethink.java index f9e0edb..5de5415 100644 --- a/src/main/java/com/bbn/hadder/Rethink.java +++ b/src/main/java/com/bbn/hadder/Rethink.java @@ -143,7 +143,7 @@ public class Rethink { } public void insertGuild(String id) { - this.insert("server", r.hashMap("id", id).with("prefix", "h.").with("links", "[]").with("linkchannel", "").with("message_id", "").with("role_id", "").with("invite_detect", false)); + this.insert("server", r.hashMap("id", id).with("prefix", "h.").with("links", "[]").with("linkchannel", "").with("message_id", "").with("role_id", "").with("invite_detect", false).with("language", "EN")); } public void insertUser(String id) { diff --git a/src/main/java/com/bbn/hadder/commands/music/JoinCommand.java b/src/main/java/com/bbn/hadder/commands/music/JoinCommand.java index 9cc43f5..6dbb093 100644 --- a/src/main/java/com/bbn/hadder/commands/music/JoinCommand.java +++ b/src/main/java/com/bbn/hadder/commands/music/JoinCommand.java @@ -19,11 +19,18 @@ public class JoinCommand implements Command { AudioManager audioManager = event.getGuild().getAudioManager(); if(!audioManager.isAttemptingToConnect()) { VoiceChannel vc = event.getMember().getVoiceState().getChannel(); + if (!event.getGuild().getSelfMember().getVoiceState().getChannel().getId().equals(vc.getId())) { event.getGuild().getAudioManager().openAudioConnection(vc); event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) .setTitle("Successfully connected") .setDescription("I successfully connected to " + vc.getName() + ".") .build()).queue(); + } else { + event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.WARNING) + .setTitle("Already connected") + .setDescription("I am already connected to your voice channel.") + .build()).queue(); + } } else { event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.WARNING) .setTitle("Already trying to connect") From 5e5b486269ed3504087a0a2137c8b57ac0d77b65 Mon Sep 17 00:00:00 2001 From: GregTCLTK Date: Sat, 7 Dec 2019 23:13:09 +0100 Subject: [PATCH 04/24] Clear Command improvement --- .../bbn/hadder/commands/moderation/ClearCommand.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/bbn/hadder/commands/moderation/ClearCommand.java b/src/main/java/com/bbn/hadder/commands/moderation/ClearCommand.java index cf5fd6a..225dae2 100644 --- a/src/main/java/com/bbn/hadder/commands/moderation/ClearCommand.java +++ b/src/main/java/com/bbn/hadder/commands/moderation/ClearCommand.java @@ -12,6 +12,7 @@ import net.dv8tion.jda.api.entities.Message; import java.util.ArrayList; import java.util.List; +import java.util.concurrent.TimeUnit; public class ClearCommand implements Command { @@ -24,14 +25,20 @@ public class ClearCommand implements Command { try { int nbToDelete = Integer.parseInt(args[0]); if(nbToDelete < 1 || nbToDelete > 200) { - event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.WARNING).setDescription("You have to choose a number between 1 and 200!").build()).queue(); + event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.WARNING).setDescription("You have to choose a number between 1 and 99!").build()).queue(); return; } List history = event.getTextChannel().getHistory().retrievePast(nbToDelete +1).complete(); List msgToDelete = new ArrayList<>(); msgToDelete.addAll(history); event.getTextChannel().deleteMessages(msgToDelete).queue(); - event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO).setDescription("Successfully deleted " + nbToDelete + " messages.").build()).queue(); + Message msg = event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO).setDescription("Successfully deleted " + nbToDelete + " messages.").build()).complete(); + try { + TimeUnit.SECONDS.sleep(2); + } catch (InterruptedException e) { + e.printStackTrace(); + } + msg.delete().queue(); } catch (NumberFormatException e) { event.getHelpCommand().sendHelp(this, event.getRethink(), event.getAuthor(), event.getTextChannel()); } From ab752205e0634d98733bf9e07b5b0d1790896fe0 Mon Sep 17 00:00:00 2001 From: GregTCLTK Date: Sun, 8 Dec 2019 01:40:09 +0100 Subject: [PATCH 05/24] Help Command improvement --- .../com/bbn/hadder/commands/fun/AvatarCommand.java | 2 +- .../java/com/bbn/hadder/commands/fun/GifCommand.java | 2 +- .../com/bbn/hadder/commands/general/HelpCommand.java | 10 +++++----- .../bbn/hadder/commands/misc/ScreenShareCommand.java | 10 +++++----- .../com/bbn/hadder/commands/moderation/BanCommand.java | 2 +- .../bbn/hadder/commands/moderation/ClearCommand.java | 4 ++-- .../hadder/commands/moderation/GuildPrefixCommand.java | 2 +- .../commands/moderation/InviteDetectCommand.java | 2 +- .../bbn/hadder/commands/moderation/KickCommand.java | 2 +- .../bbn/hadder/commands/moderation/LinkCommand.java | 2 +- .../bbn/hadder/commands/moderation/NickCommand.java | 4 ++-- .../bbn/hadder/commands/moderation/RoleCommand.java | 2 +- .../com/bbn/hadder/commands/owner/EvalCommand.java | 2 +- .../bbn/hadder/commands/owner/GuildLeaveCommand.java | 2 +- .../bbn/hadder/commands/settings/LanguageCommand.java | 2 +- .../bbn/hadder/commands/settings/PrefixCommand.java | 2 +- 16 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/main/java/com/bbn/hadder/commands/fun/AvatarCommand.java b/src/main/java/com/bbn/hadder/commands/fun/AvatarCommand.java index fab81a9..2e807c2 100644 --- a/src/main/java/com/bbn/hadder/commands/fun/AvatarCommand.java +++ b/src/main/java/com/bbn/hadder/commands/fun/AvatarCommand.java @@ -35,7 +35,7 @@ public class AvatarCommand implements Command { .setFooter(member.getUser().getAsTag()) .build()).queue(); } else { - event.getHelpCommand().sendHelp(this , event.getRethink(), event.getAuthor(), event.getTextChannel()); + event.getHelpCommand().sendHelp(this, event); } } diff --git a/src/main/java/com/bbn/hadder/commands/fun/GifCommand.java b/src/main/java/com/bbn/hadder/commands/fun/GifCommand.java index bcab30a..7503bc4 100644 --- a/src/main/java/com/bbn/hadder/commands/fun/GifCommand.java +++ b/src/main/java/com/bbn/hadder/commands/fun/GifCommand.java @@ -39,7 +39,7 @@ public class GifCommand implements Command { } catch (Exception e) { event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.ERROR).setTitle("Error").setDescription("Please try again with another term.").build()).queue(); } - } else event.getHelpCommand().sendHelp(this, event.getRethink(), event.getAuthor(), event.getTextChannel()); + } else event.getHelpCommand().sendHelp(this, event); } @Override diff --git a/src/main/java/com/bbn/hadder/commands/general/HelpCommand.java b/src/main/java/com/bbn/hadder/commands/general/HelpCommand.java index 1d196ac..aaf1f6e 100644 --- a/src/main/java/com/bbn/hadder/commands/general/HelpCommand.java +++ b/src/main/java/com/bbn/hadder/commands/general/HelpCommand.java @@ -48,7 +48,7 @@ public class HelpCommand implements Command { for (Command cmd : event.getCommandHandler().getCommandList()) { for (String label : cmd.labels()) { if (label.equalsIgnoreCase(args[0])) { - sendHelp(cmd, event.getRethink(), event.getAuthor(), event.getTextChannel()); + sendHelp(cmd, event); } } } @@ -58,15 +58,15 @@ public class HelpCommand implements Command { } } - public void sendHelp(Command cmd, Rethink rethink, User author, TextChannel channel) { + public void sendHelp(Command cmd, CommandEvent event) { if (!cmd.getClass().getPackageName().endsWith("owner") || (cmd.getClass().getPackageName().endsWith("owner") && - (author.getId().equals("477141528981012511") || author.getId().equals("261083609148948488")))) { + (event.getAuthor().getId().equals("477141528981012511") || event.getAuthor().getId().equals("261083609148948488")))) { EmbedBuilder eb = new EmbedBuilder(); String name = cmd.labels()[0]; eb.setDescription(cmd.description()).setTitle(name.replaceFirst(String.valueOf(name.charAt(0)), String.valueOf(name.charAt(0)).toUpperCase())); - eb.addField("Usage", rethink.getUserPrefix(author.getId()) + cmd.labels()[0] + " " + cmd.usage(), false); + eb.addField("Usage", event.getRethink().getUserPrefix(event.getAuthor().getId()) + cmd.labels()[0] + " " + cmd.usage(), false); new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO); - channel.sendMessage(eb.build()).queue(); + event.getChannel().sendMessage(eb.build()).queue(); } } diff --git a/src/main/java/com/bbn/hadder/commands/misc/ScreenShareCommand.java b/src/main/java/com/bbn/hadder/commands/misc/ScreenShareCommand.java index 1678f56..f320a6d 100644 --- a/src/main/java/com/bbn/hadder/commands/misc/ScreenShareCommand.java +++ b/src/main/java/com/bbn/hadder/commands/misc/ScreenShareCommand.java @@ -27,7 +27,7 @@ public class ScreenShareCommand implements Command { event.getChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.ERROR) .setTitle("Wait, that's illegal") .setDescription("This ID is invalid. \nMaybe you entered a wrong ID? \n\nNote: Make sure the Voice Channel is on this Guild.").build()).queue(); - event.getHelpCommand().sendHelp(this, event.getRethink(), event.getAuthor(), event.getTextChannel()); + event.getHelpCommand().sendHelp(this, event); return; } } @@ -53,20 +53,20 @@ public class ScreenShareCommand implements Command { event.getChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.ERROR) .setTitle("You specified a wrong number!").build()).queue(); - event.getHelpCommand().sendHelp(this, event.getRethink(), event.getAuthor(), event.getTextChannel()); + event.getHelpCommand().sendHelp(this, event); } } catch (NumberFormatException e) { event.getChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.ERROR) .setTitle("Wait, that's illegal") .setDescription("This isn't a Number.").build()).queue(); - event.getHelpCommand().sendHelp(this, event.getRethink(), event.getAuthor(), event.getTextChannel()); + event.getHelpCommand().sendHelp(this, event); } }, event.getJDA(), event.getAuthor()); } else if (vcs.size()==0) { event.getChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.ERROR) .setTitle("Hol' up") .setDescription("There is no Voice Channel named like this. \n\nNote: Make sure the Voice Channel is on this Guild.").build()).queue(); - event.getHelpCommand().sendHelp(this, event.getRethink(), event.getAuthor(), event.getTextChannel()); + event.getHelpCommand().sendHelp(this, event); } else { event.getChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) .setTitle("Here's your Url to share your Screen") @@ -74,7 +74,7 @@ public class ScreenShareCommand implements Command { } } } else { - event.getHelpCommand().sendHelp(this, event.getRethink(), event.getAuthor(), event.getTextChannel()); + event.getHelpCommand().sendHelp(this, event); } } diff --git a/src/main/java/com/bbn/hadder/commands/moderation/BanCommand.java b/src/main/java/com/bbn/hadder/commands/moderation/BanCommand.java index 7c8ce46..6796b72 100644 --- a/src/main/java/com/bbn/hadder/commands/moderation/BanCommand.java +++ b/src/main/java/com/bbn/hadder/commands/moderation/BanCommand.java @@ -32,7 +32,7 @@ public class BanCommand implements Command { event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.WARNING).setTitle("Not possible").setDescription("You can't ban yourself!").build()).queue(); } } else if (event.getMessage().getMentionedMembers().size() == 0) { - event.getHelpCommand().sendHelp(this, event.getRethink(), event.getAuthor(), event.getTextChannel()); + event.getHelpCommand().sendHelp(this, event); } else if (event.getMessage().getMentionedMembers().size() > 1) { for (int i = 0; i < event.getMessage().getMentionedMembers().size(); i++) { Member member = event.getMessage().getMentionedMembers().get(i); diff --git a/src/main/java/com/bbn/hadder/commands/moderation/ClearCommand.java b/src/main/java/com/bbn/hadder/commands/moderation/ClearCommand.java index 225dae2..d5fe960 100644 --- a/src/main/java/com/bbn/hadder/commands/moderation/ClearCommand.java +++ b/src/main/java/com/bbn/hadder/commands/moderation/ClearCommand.java @@ -40,7 +40,7 @@ public class ClearCommand implements Command { } msg.delete().queue(); } catch (NumberFormatException e) { - event.getHelpCommand().sendHelp(this, event.getRethink(), event.getAuthor(), event.getTextChannel()); + event.getHelpCommand().sendHelp(this, event); } } else { event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.NO_SELF_PERMISSION).build()).queue(); @@ -49,7 +49,7 @@ public class ClearCommand implements Command { event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.NO_PERMISSION).build()).queue(); } } else { - event.getHelpCommand().sendHelp(this, event.getRethink(), event.getAuthor(), event.getTextChannel()); + event.getHelpCommand().sendHelp(this, event); } } diff --git a/src/main/java/com/bbn/hadder/commands/moderation/GuildPrefixCommand.java b/src/main/java/com/bbn/hadder/commands/moderation/GuildPrefixCommand.java index 5281789..8891d0f 100644 --- a/src/main/java/com/bbn/hadder/commands/moderation/GuildPrefixCommand.java +++ b/src/main/java/com/bbn/hadder/commands/moderation/GuildPrefixCommand.java @@ -19,7 +19,7 @@ public class GuildPrefixCommand implements Command { event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.WARNING).setDescription("The prefix must not contain **\"**").build()).queue(); } } else { - event.getHelpCommand().sendHelp(this, event.getRethink(), event.getAuthor(), event.getTextChannel()); + event.getHelpCommand().sendHelp(this, event); } } else { event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.NO_PERMISSION).build()).queue(); diff --git a/src/main/java/com/bbn/hadder/commands/moderation/InviteDetectCommand.java b/src/main/java/com/bbn/hadder/commands/moderation/InviteDetectCommand.java index 12ddc03..084f787 100644 --- a/src/main/java/com/bbn/hadder/commands/moderation/InviteDetectCommand.java +++ b/src/main/java/com/bbn/hadder/commands/moderation/InviteDetectCommand.java @@ -51,7 +51,7 @@ public class InviteDetectCommand implements Command { event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.NO_PERMISSION).build()).queue(); } } else { - event.getHelpCommand().sendHelp(this, event.getRethink(), event.getAuthor(), event.getTextChannel()); + event.getHelpCommand().sendHelp(this, event); } } diff --git a/src/main/java/com/bbn/hadder/commands/moderation/KickCommand.java b/src/main/java/com/bbn/hadder/commands/moderation/KickCommand.java index 9da327a..2c44aa4 100644 --- a/src/main/java/com/bbn/hadder/commands/moderation/KickCommand.java +++ b/src/main/java/com/bbn/hadder/commands/moderation/KickCommand.java @@ -33,7 +33,7 @@ public class KickCommand implements Command { event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.WARNING).setDescription("You can't kick yourself.").build()).queue(); } } else if (event.getMessage().getMentionedMembers().size() == 0) { - event.getHelpCommand().sendHelp(this, event.getRethink(), event.getAuthor(), event.getTextChannel()); + event.getHelpCommand().sendHelp(this, event); } else if (event.getMessage().getMentionedMembers().size() > 1) { for (int i = 0; i < event.getMessage().getMentionedMembers().size(); i++) { Member member = event.getMessage().getMentionedMembers().get(i); diff --git a/src/main/java/com/bbn/hadder/commands/moderation/LinkCommand.java b/src/main/java/com/bbn/hadder/commands/moderation/LinkCommand.java index 4a08fbb..bd8a248 100644 --- a/src/main/java/com/bbn/hadder/commands/moderation/LinkCommand.java +++ b/src/main/java/com/bbn/hadder/commands/moderation/LinkCommand.java @@ -9,7 +9,7 @@ import net.dv8tion.jda.api.entities.Guild; public class LinkCommand implements Command { @Override public void executed(String[] args, CommandEvent event) { - if (args.length == 0) event.getHelpCommand().sendHelp(this, event.getRethink(), event.getAuthor(), event.getTextChannel()); + if (args.length == 0) event.getHelpCommand().sendHelp(this, event); switch (args[0].toLowerCase()) { case "add": if (args.length != 2) return; diff --git a/src/main/java/com/bbn/hadder/commands/moderation/NickCommand.java b/src/main/java/com/bbn/hadder/commands/moderation/NickCommand.java index 4138901..7aad865 100644 --- a/src/main/java/com/bbn/hadder/commands/moderation/NickCommand.java +++ b/src/main/java/com/bbn/hadder/commands/moderation/NickCommand.java @@ -28,7 +28,7 @@ public class NickCommand implements Command { event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO).setTitle("✅ Successfully nicked ✅").setDescription("I successfully nicked " + event.getMessage().getMentionedMembers().get(0).getUser().getAsTag() + ".").build()).queue(); } } else { - event.getHelpCommand().sendHelp(this, event.getRethink(), event.getAuthor(), event.getTextChannel()); + event.getHelpCommand().sendHelp(this, event); } } else { event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.NO_SELF_PERMISSION).build()).queue(); @@ -43,7 +43,7 @@ public class NickCommand implements Command { } } } else if (event.getMessage().getMentionedMembers().size() == 0) { - event.getHelpCommand().sendHelp(this, event.getRethink(), event.getAuthor(), event.getTextChannel()); + event.getHelpCommand().sendHelp(this, event); } else { for (int i = 0; i < event.getMessage().getMentionedMembers().size(); i++) { Member member = event.getMessage().getMentionedMembers().get(i); diff --git a/src/main/java/com/bbn/hadder/commands/moderation/RoleCommand.java b/src/main/java/com/bbn/hadder/commands/moderation/RoleCommand.java index 19dfe54..3da7135 100644 --- a/src/main/java/com/bbn/hadder/commands/moderation/RoleCommand.java +++ b/src/main/java/com/bbn/hadder/commands/moderation/RoleCommand.java @@ -67,7 +67,7 @@ public class RoleCommand implements Command { event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.NO_PERMISSION).build()).queue(); } } else { - event.getHelpCommand().sendHelp(this, event.getRethink(), event.getAuthor(), event.getTextChannel()); + event.getHelpCommand().sendHelp(this, event); } } diff --git a/src/main/java/com/bbn/hadder/commands/owner/EvalCommand.java b/src/main/java/com/bbn/hadder/commands/owner/EvalCommand.java index 189a156..c18964f 100644 --- a/src/main/java/com/bbn/hadder/commands/owner/EvalCommand.java +++ b/src/main/java/com/bbn/hadder/commands/owner/EvalCommand.java @@ -77,7 +77,7 @@ public class EvalCommand implements Command { }, 0, TimeUnit.MILLISECONDS); } else { - event.getHelpCommand().sendHelp(this, event.getRethink(), event.getAuthor(), event.getTextChannel()); + event.getHelpCommand().sendHelp(this, event); } } else { event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.NO_PERMISSION).build()).queue(); diff --git a/src/main/java/com/bbn/hadder/commands/owner/GuildLeaveCommand.java b/src/main/java/com/bbn/hadder/commands/owner/GuildLeaveCommand.java index 5b1975b..90d1318 100644 --- a/src/main/java/com/bbn/hadder/commands/owner/GuildLeaveCommand.java +++ b/src/main/java/com/bbn/hadder/commands/owner/GuildLeaveCommand.java @@ -22,7 +22,7 @@ public class GuildLeaveCommand implements Command { .setDescription("I successfully left " + guild.getName()) .build()).queue(); } else { - event.getHelpCommand().sendHelp(this, event.getRethink(), event.getAuthor(), event.getTextChannel()); + event.getHelpCommand().sendHelp(this, event); } } else { event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.NO_PERMISSION).build()).queue(); diff --git a/src/main/java/com/bbn/hadder/commands/settings/LanguageCommand.java b/src/main/java/com/bbn/hadder/commands/settings/LanguageCommand.java index 0357cf5..ce450f1 100644 --- a/src/main/java/com/bbn/hadder/commands/settings/LanguageCommand.java +++ b/src/main/java/com/bbn/hadder/commands/settings/LanguageCommand.java @@ -23,7 +23,7 @@ public class LanguageCommand implements Command { break; } } else { - event.getHelpCommand().sendHelp(this, event.getRethink(), event.getAuthor(), event.getTextChannel()); + event.getHelpCommand().sendHelp(this, event); } } diff --git a/src/main/java/com/bbn/hadder/commands/settings/PrefixCommand.java b/src/main/java/com/bbn/hadder/commands/settings/PrefixCommand.java index aa70bf1..4de3e84 100644 --- a/src/main/java/com/bbn/hadder/commands/settings/PrefixCommand.java +++ b/src/main/java/com/bbn/hadder/commands/settings/PrefixCommand.java @@ -16,7 +16,7 @@ public class PrefixCommand implements Command { event.getRethink().setUserPrefix(args[0], event.getAuthor().getId()); event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO).setTitle("✅ Successfully set ✅").setDescription("I successfully set the new prefix for you to " + args[0]).build()).queue(); } else { - event.getHelpCommand().sendHelp(this, event.getRethink(), event.getAuthor(), event.getTextChannel()); + event.getHelpCommand().sendHelp(this, event); } } From 910289d938df0b18f277073c71425d495792c432 Mon Sep 17 00:00:00 2001 From: Hax Date: Sun, 8 Dec 2019 21:36:12 +0100 Subject: [PATCH 06/24] Hello my friend. I'm a fix --- .../com/bbn/hadder/commands/moderation/RulesCommand.java | 6 ++++-- src/main/java/com/bbn/hadder/listener/RulesListener.java | 9 ++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/bbn/hadder/commands/moderation/RulesCommand.java b/src/main/java/com/bbn/hadder/commands/moderation/RulesCommand.java index 244df86..497e5f0 100644 --- a/src/main/java/com/bbn/hadder/commands/moderation/RulesCommand.java +++ b/src/main/java/com/bbn/hadder/commands/moderation/RulesCommand.java @@ -74,8 +74,10 @@ public class RulesCommand implements Command { Role role = event.getMessage().getMentionedRoles().get(0); setRole(event, channel, message, event3, role); } else { - Role role = event3.getGuild().getRolesByName(event3.getMessage().getContentStripped(), true).get(0); - setRole(event, channel, message, event3, role); + if (event3.getGuild().getRolesByName(event3.getMessage().getContentStripped(), true).size()>0) { + Role role = event3.getGuild().getRolesByName(event3.getMessage().getContentStripped(), true).get(0); + setRole(event, channel, message, event3, role); + } // TODO } }, event.getJDA(), event.getAuthor()); }, event.getJDA(), event.getAuthor()); diff --git a/src/main/java/com/bbn/hadder/listener/RulesListener.java b/src/main/java/com/bbn/hadder/listener/RulesListener.java index 1867d79..8483647 100644 --- a/src/main/java/com/bbn/hadder/listener/RulesListener.java +++ b/src/main/java/com/bbn/hadder/listener/RulesListener.java @@ -29,8 +29,15 @@ public class RulesListener extends ListenerAdapter { event.getMember().kick().reason("Declined the rules"); } } - } else { + } else if (event.getReactionEmote().isEmoji()) { + if (event.getReactionEmote().getEmoji().equals(rethink.getRulesAEmote(event.getGuild().getId()))) { event.getGuild().addRoleToMember(event.getMember(), event.getGuild().getRoleById(rethink.getRulesRID(event.getGuild().getId()))).reason("Accepted rules").queue(); + } else if (event.getReactionEmote().getEmoji().equals(rethink.getRulesDEmote(event.getGuild().getId()))) { + event.getReaction().removeReaction(event.getUser()).queue(); + if (event.getGuild().getSelfMember().canInteract(event.getMember())) { + event.getMember().kick().reason("Declined the rules"); + } + } } } } From fc203e02f76c18dd63a129b8b7203594232df796 Mon Sep 17 00:00:00 2001 From: Hax Date: Sun, 8 Dec 2019 22:05:11 +0100 Subject: [PATCH 07/24] Just for testing --- src/main/java/com/bbn/hadder/Rethink.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/bbn/hadder/Rethink.java b/src/main/java/com/bbn/hadder/Rethink.java index caf380f..1267d3e 100644 --- a/src/main/java/com/bbn/hadder/Rethink.java +++ b/src/main/java/com/bbn/hadder/Rethink.java @@ -54,11 +54,11 @@ public class Rethink { return new JSONArray(); } - private Object get(String table, String where, String value, String column) { + public Object get(String table, String where, String value, String column) { return this.getAsArray(table, where, value).getJSONObject(0).get(column); } - private String update(String table, String wherevalue, String what, String whatvalue) { + public String update(String table, String wherevalue, String what, String whatvalue) { String out = ""; try { Cursor cursor = r.table(table).get(wherevalue).update(r.hashMap(what, whatvalue)).run(conn); @@ -67,7 +67,7 @@ public class Rethink { return out; } - private String insert(String table, Object object) { + public String insert(String table, Object object) { String out = ""; try { Cursor cursor = r.table(table).insert(object).run(conn); From 0fdd5152b79c51c99f814d41f2d6c5be7c67d962 Mon Sep 17 00:00:00 2001 From: GregTCLTK Date: Mon, 9 Dec 2019 07:49:36 +0100 Subject: [PATCH 08/24] Hotfix --- src/main/java/com/bbn/hadder/listener/RulesListener.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/main/java/com/bbn/hadder/listener/RulesListener.java b/src/main/java/com/bbn/hadder/listener/RulesListener.java index 8483647..7b3cb0e 100644 --- a/src/main/java/com/bbn/hadder/listener/RulesListener.java +++ b/src/main/java/com/bbn/hadder/listener/RulesListener.java @@ -30,14 +30,7 @@ public class RulesListener extends ListenerAdapter { } } } else if (event.getReactionEmote().isEmoji()) { - if (event.getReactionEmote().getEmoji().equals(rethink.getRulesAEmote(event.getGuild().getId()))) { - event.getGuild().addRoleToMember(event.getMember(), event.getGuild().getRoleById(rethink.getRulesRID(event.getGuild().getId()))).reason("Accepted rules").queue(); - } else if (event.getReactionEmote().getEmoji().equals(rethink.getRulesDEmote(event.getGuild().getId()))) { - event.getReaction().removeReaction(event.getUser()).queue(); - if (event.getGuild().getSelfMember().canInteract(event.getMember())) { - event.getMember().kick().reason("Declined the rules"); - } - } + event.getGuild().addRoleToMember(event.getMember(), event.getGuild().getRoleById(rethink.getRulesRID(event.getGuild().getId()))).reason("Accepted rules").queue(); } } } From fc0a3d9cc1b935648d9f98fbd69af570bec6f79d Mon Sep 17 00:00:00 2001 From: GregTCLTK Date: Mon, 9 Dec 2019 07:53:51 +0100 Subject: [PATCH 09/24] Error message --- .../com/bbn/hadder/commands/moderation/RulesCommand.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/bbn/hadder/commands/moderation/RulesCommand.java b/src/main/java/com/bbn/hadder/commands/moderation/RulesCommand.java index 497e5f0..07a86b4 100644 --- a/src/main/java/com/bbn/hadder/commands/moderation/RulesCommand.java +++ b/src/main/java/com/bbn/hadder/commands/moderation/RulesCommand.java @@ -74,10 +74,15 @@ public class RulesCommand implements Command { Role role = event.getMessage().getMentionedRoles().get(0); setRole(event, channel, message, event3, role); } else { - if (event3.getGuild().getRolesByName(event3.getMessage().getContentStripped(), true).size()>0) { + if (event3.getGuild().getRolesByName(event3.getMessage().getContentStripped(), true).size() > 0) { Role role = event3.getGuild().getRolesByName(event3.getMessage().getContentStripped(), true).get(0); setRole(event, channel, message, event3, role); - } // TODO + } else { + event3.getChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.WARNING) + .setTitle("Role does not exist") + .setDescription("The specified role does not exist on this guild.") + .build()).queue(); + } } }, event.getJDA(), event.getAuthor()); }, event.getJDA(), event.getAuthor()); From 5e6a84b583f50c6e5f8e6763dba0da64c11a39bc Mon Sep 17 00:00:00 2001 From: GregTCLTK Date: Mon, 9 Dec 2019 08:02:10 +0100 Subject: [PATCH 10/24] Remove unused imports --- src/main/java/com/bbn/hadder/commands/general/HelpCommand.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/main/java/com/bbn/hadder/commands/general/HelpCommand.java b/src/main/java/com/bbn/hadder/commands/general/HelpCommand.java index aaf1f6e..476da32 100644 --- a/src/main/java/com/bbn/hadder/commands/general/HelpCommand.java +++ b/src/main/java/com/bbn/hadder/commands/general/HelpCommand.java @@ -1,13 +1,10 @@ package com.bbn.hadder.commands.general; -import com.bbn.hadder.Rethink; import com.bbn.hadder.commands.Command; import com.bbn.hadder.commands.CommandEvent; import com.bbn.hadder.utils.MessageEditor; import net.dv8tion.jda.api.EmbedBuilder; import net.dv8tion.jda.api.Permission; -import net.dv8tion.jda.api.entities.TextChannel; -import net.dv8tion.jda.api.entities.User; import java.util.ArrayList; import java.util.HashMap; From f665e7ef8f36c816748ef62f818b51d7766a40aa Mon Sep 17 00:00:00 2001 From: GregTCLTK Date: Mon, 9 Dec 2019 09:12:38 +0100 Subject: [PATCH 11/24] codefactor --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 1e24aef..025df75 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ Hadder Discord is a multi-purpose Discord bot with 100% uptime. [![Build Status](https://github.com/BigBotNetwork/Hadder/workflows/Hadder/badge.svg)](https://github.com/BigBotNetwork/Hadder) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/ddb8cb7ec85f467caa691c175e1f01b5)](https://www.codacy.com/gh/BigBotNetwork/Hadder?utm_source=github.com&utm_medium=referral&utm_content=BigBotNetwork/Hadder&utm_campaign=Badge_Grade) +[![CodeFactor](https://www.codefactor.io/repository/github/bigbotnetwork/hadder/badge)](https://www.codefactor.io/repository/github/bigbotnetwork/hadder) [![Crowdin](https://badges.crowdin.net/e/bc0babde730eb3eada34778502a31b03/localized.svg)](https://bbn.crowdin.com/hadder) From 16f26604cd4b678d924a82ee689493df1eebb5a3 Mon Sep 17 00:00:00 2001 From: GregTCLTK Date: Mon, 9 Dec 2019 09:22:03 +0100 Subject: [PATCH 12/24] InviteLink Detect improvements --- .../hadder/listener/InviteLinkListener.java | 79 +++++++------------ 1 file changed, 28 insertions(+), 51 deletions(-) diff --git a/src/main/java/com/bbn/hadder/listener/InviteLinkListener.java b/src/main/java/com/bbn/hadder/listener/InviteLinkListener.java index b8bc2bb..12c9da0 100644 --- a/src/main/java/com/bbn/hadder/listener/InviteLinkListener.java +++ b/src/main/java/com/bbn/hadder/listener/InviteLinkListener.java @@ -7,6 +7,7 @@ package com.bbn.hadder.listener; import com.bbn.hadder.Rethink; import net.dv8tion.jda.api.Permission; import net.dv8tion.jda.api.entities.ChannelType; +import net.dv8tion.jda.api.entities.Message; import net.dv8tion.jda.api.events.message.MessageReceivedEvent; import net.dv8tion.jda.api.events.message.MessageUpdateEvent; import net.dv8tion.jda.api.hooks.ListenerAdapter; @@ -30,67 +31,43 @@ public class InviteLinkListener extends ListenerAdapter { if (event.isFromType(ChannelType.TEXT)) { if (event.getMessage().getContentRaw().contains("discord.gg/")) { if (!event.getMember().hasPermission(Permission.ADMINISTRATOR) && rethink.getInviteDetection(event.getGuild().getId())) { - String split = event.getMessage().getContentRaw().split("discord.gg/", 10)[1]; - String invite = split.split(" ")[0]; - OkHttpClient client = new OkHttpClient(); - Request request = new Request.Builder().url("https://canary.discordapp.com/api/v6/invites/" + invite).build(); - try { - Response response = client.newCall(request).execute(); - JSONObject json = new JSONObject(response.body().string()); - if (!json.toString().contains("\"message\":")) { - event.getMessage().delete().reason("Invite Link detected").queue(); - } - } catch (Exception e) { - e.printStackTrace(); - } + checkInvite(event.getMessage(), "discord.gg/"); } - } else if (event.getMessage().getContentRaw().contains("discordapp.com/invite") && !event.getMember().hasPermission(Permission.ADMINISTRATOR) && rethink.getInviteDetection(event.getGuild().getId())) { - String split = event.getMessage().getContentRaw().split("discordapp.com/invite/", 10)[1]; - String invite = split.split(" ")[0]; - OkHttpClient client = new OkHttpClient(); - Request request = new Request.Builder().url("https://canary.discordapp.com/api/v6/invites/" + invite).build(); - try { - Response response = client.newCall(request).execute(); - JSONObject json = new JSONObject(response.body().string()); - if (!json.toString().contains("\"message\":")) { - event.getMessage().delete().reason("Invite Link detected").queue(); - } - } catch (Exception e) { - e.printStackTrace(); + } else if (event.getMessage().getContentRaw().contains("discordapp.com/invite")) { + if ( !event.getMember().hasPermission(Permission.ADMINISTRATOR) && rethink.getInviteDetection(event.getGuild().getId())) { + checkInvite(event.getMessage(), "discordapp.com/invite/"); } } } } + public void checkInvite(Message message, String regex) { + String split = message.getContentRaw().split(regex, 10)[1]; + String invite = split.split(" ")[0]; + OkHttpClient client = new OkHttpClient(); + Request request = new Request.Builder().url("https://canary.discordapp.com/api/v6/invites/" + invite).build(); + try { + Response response = client.newCall(request).execute(); + JSONObject json = new JSONObject(response.body().string()); + if (!json.toString().contains("\"message\":")) { + message.delete().reason("Invite Link detected").queue(); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + @Override public void onMessageUpdate(@Nonnull MessageUpdateEvent event) { - if (event.isFromType(ChannelType.TEXT) && event.getMessage().getContentRaw().contains("discord.gg/") && !event.getMember().hasPermission(Permission.ADMINISTRATOR) && rethink.getInviteDetection(event.getGuild().getId())) { - String split = event.getMessage().getContentRaw().split("discord.gg/", 10)[1]; - String invite = split.split(" ")[0]; - OkHttpClient client = new OkHttpClient(); - Request request = new Request.Builder().url("https://canary.discordapp.com/api/v6/invites/" + invite).build(); - try { - Response response = client.newCall(request).execute(); - JSONObject json = new JSONObject(response.body().string()); - if (!json.toString().contains("\"message\":")) { - event.getMessage().delete().reason("Invite Link detected").queue(); + if (event.isFromType(ChannelType.TEXT)) { + if (event.getMessage().getContentRaw().contains("discord.gg/")) { + if (!event.getMember().hasPermission(Permission.ADMINISTRATOR) && rethink.getInviteDetection(event.getGuild().getId())) { + checkInvite(event.getMessage(), "discord.gg/"); } - } catch (Exception e) { - e.printStackTrace(); - } - } else if (event.getMessage().getContentRaw().contains("discordapp.com/invite") && !event.getMember().hasPermission(Permission.ADMINISTRATOR) && rethink.getInviteDetection(event.getGuild().getId())) { - String split = event.getMessage().getContentRaw().split("discordapp.com/invite/", 10)[1]; - String invite = split.split(" ")[0]; - OkHttpClient client = new OkHttpClient(); - Request request = new Request.Builder().url("https://canary.discordapp.com/api/v6/invites/" + invite).build(); - try { - Response response = client.newCall(request).execute(); - JSONObject json = new JSONObject(response.body().string()); - if (!json.toString().contains("\"message\":")) { - event.getMessage().delete().reason("Invite Link detected").queue(); + } else if (event.getMessage().getContentRaw().contains("discordapp.com/invite")) { + if (!event.getMember().hasPermission(Permission.ADMINISTRATOR) && rethink.getInviteDetection(event.getGuild().getId())) { + checkInvite(event.getMessage(), "discordapp.com/invite/"); } - } catch (Exception e) { - e.printStackTrace(); } } } From 3734947794198154cbf7aa6dcec5278aaa4471cd Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2019 13:20:57 +0000 Subject: [PATCH 13/24] Bump JDA from 4.0.0_70 to 4.0.0_73 Bumps JDA from 4.0.0_70 to 4.0.0_73. Signed-off-by: dependabot-preview[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5e8bc5b..b474ed6 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ net.dv8tion JDA - 4.0.0_70 + 4.0.0_73 org.json From d6397c0c99b9ab362bf45cc55770e338afd6c626 Mon Sep 17 00:00:00 2001 From: Skidder Date: Mon, 9 Dec 2019 16:46:24 +0100 Subject: [PATCH 14/24] Set theme jekyll-theme-cayman From 981e97164b0a97ad1053d9f547f2e98eacbe4955 Mon Sep 17 00:00:00 2001 From: GregTCLTK Date: Mon, 9 Dec 2019 16:48:06 +0100 Subject: [PATCH 15/24] Remove docs --- docs/remove.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 docs/remove.md diff --git a/docs/remove.md b/docs/remove.md deleted file mode 100644 index e69de29..0000000 From c593004c7d59ee1791bfbea2786920b5121563b1 Mon Sep 17 00:00:00 2001 From: GregTCLTK Date: Mon, 9 Dec 2019 17:07:34 +0100 Subject: [PATCH 16/24] Shorter code dfsf --- .../moderation/RegionChangeCommand.java | 116 ++++-------------- 1 file changed, 26 insertions(+), 90 deletions(-) diff --git a/src/main/java/com/bbn/hadder/commands/moderation/RegionChangeCommand.java b/src/main/java/com/bbn/hadder/commands/moderation/RegionChangeCommand.java index f1788fe..db283fe 100644 --- a/src/main/java/com/bbn/hadder/commands/moderation/RegionChangeCommand.java +++ b/src/main/java/com/bbn/hadder/commands/moderation/RegionChangeCommand.java @@ -19,130 +19,58 @@ public class RegionChangeCommand implements Command { if (event.getMember().hasPermission(Permission.MANAGE_SERVER) || event.getConfig().getOwners().toString().contains(event.getAuthor().getId())) { switch (args[0].toLowerCase()) { case "amsterdam": - event.getGuild().getManager().setRegion(Region.AMSTERDAM).reason("Region changed by " + event.getAuthor().getAsTag()).queue(); - event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) - .setTitle("Successfully set region") - .setDescription("I successfully set the new server region to Amsterdam.") - .build()).queue(); + setRegion(Region.AMSTERDAM, "Amsterdam", event); break; case "frankfurt": - event.getGuild().getManager().setRegion(Region.FRANKFURT).reason("Region changed by " + event.getAuthor().getAsTag()).queue(); - event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) - .setTitle("Successfully set region") - .setDescription("I successfully set the new server region to Frankfurt.") - .build()).queue(); + setRegion(Region.FRANKFURT, "Frankfurt", event); break; case "eu-west": - event.getGuild().getManager().setRegion(Region.EU_WEST).reason("Region changed by " + event.getAuthor().getAsTag()).queue(); - event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) - .setTitle("Successfully set region") - .setDescription("I successfully set the new server region to EU-West.") - .build()).queue(); + setRegion(Region.EU_WEST, "EU West", event); break; case "eu-central": - event.getGuild().getManager().setRegion(Region.EU_CENTRAL).reason("Region changed by " + event.getAuthor().getAsTag()).queue(); - event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) - .setTitle("Successfully set region") - .setDescription("I successfully set the new server region to EU-Central.") - .build()).queue(); + setRegion(Region.EU_CENTRAL, "EU Central", event); break; case "europe": - event.getGuild().getManager().setRegion(Region.EUROPE).reason("Region changed by " + event.getAuthor().getAsTag()).queue(); - event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) - .setTitle("Successfully set region") - .setDescription("I successfully set the new server region to Europe.") - .build()).queue(); + setRegion(Region.EUROPE, "EUROPE", event); break; case "brazil": - event.getGuild().getManager().setRegion(Region.BRAZIL).reason("Region changed by " + event.getAuthor().getAsTag()).queue(); - event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) - .setTitle("Successfully set region") - .setDescription("I successfully set the new server region to Brazil.") - .build()).queue(); + setRegion(Region.BRAZIL, "Brazil", event); break; case "hongkong": - event.getGuild().getManager().setRegion(Region.HONG_KONG).reason("Region changed by " + event.getAuthor().getAsTag()).queue(); - event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) - .setTitle("Successfully set region") - .setDescription("I successfully set the new server region to Hong Kong.") - .build()).queue(); + setRegion(Region.HONG_KONG, "Hong Kong", event); break; case "india": - event.getGuild().getManager().setRegion(Region.INDIA).reason("Region changed by " + event.getAuthor().getAsTag()).queue(); - event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) - .setTitle("Successfully set region") - .setDescription("I successfully set the new server region to India.") - .build()).queue(); + setRegion(Region.INDIA, "India", event); break; case "japan": - event.getGuild().getManager().setRegion(Region.JAPAN).reason("Region changed by " + event.getAuthor().getAsTag()).queue(); - event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) - .setTitle("Successfully set region") - .setDescription("I successfully set the new server region to Japan.") - .build()).queue(); + setRegion(Region.JAPAN, "Japan", event); break; case "london": - event.getGuild().getManager().setRegion(Region.LONDON).reason("Region changed by " + event.getAuthor().getAsTag()).queue(); - event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) - .setTitle("Successfully set region") - .setDescription("I successfully set the new server region to London.") - .build()).queue(); + setRegion(Region.LONDON, "London", event); break; case "russia": - event.getGuild().getManager().setRegion(Region.RUSSIA).reason("Region changed by " + event.getAuthor().getAsTag()).queue(); - event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) - .setTitle("Successfully set region") - .setDescription("I successfully set the new server region to Russia.") - .build()).queue(); + setRegion(Region.RUSSIA, "Russia", event); break; case "singapore": - event.getGuild().getManager().setRegion(Region.SINGAPORE).reason("Region changed by " + event.getAuthor().getAsTag()).queue(); - event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) - .setTitle("Successfully set region") - .setDescription("I successfully set the new server region to Singapore.") - .build()).queue(); + setRegion(Region.SINGAPORE, "Singapore", event); break; case "south-africa": - event.getGuild().getManager().setRegion(Region.SOUTH_AFRICA).reason("Region changed by " + event.getAuthor().getAsTag()).queue(); - event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) - .setTitle("Successfully set region") - .setDescription("I successfully set the new server region to South Africa.") - .build()).queue(); + setRegion(Region.SOUTH_AFRICA, "South Africa", event); break; case "sydney": - event.getGuild().getManager().setRegion(Region.SYDNEY).reason("Region changed by " + event.getAuthor().getAsTag()).queue(); - event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) - .setTitle("Successfully set region") - .setDescription("I successfully set the new server region to Sydney.") - .build()).queue(); + setRegion(Region.SYDNEY, "Sydney", event); break; case "us-central": - event.getGuild().getManager().setRegion(Region.US_CENTRAL).reason("Region changed by " + event.getAuthor().getAsTag()).queue(); - event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) - .setTitle("Successfully set region") - .setDescription("I successfully set the new server region to US Central.") - .build()).queue(); + setRegion(Region.US_CENTRAL, "US Central", event); break; case "us-east": - event.getGuild().getManager().setRegion(Region.US_EAST).reason("Region changed by " + event.getAuthor().getAsTag()).queue(); - event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) - .setTitle("Successfully set region") - .setDescription("I successfully set the new server region to US East.") - .build()).queue(); + setRegion(Region.US_EAST, "US East", event); break; case "us-west": - event.getGuild().getManager().setRegion(Region.US_WEST).reason("Region changed by " + event.getAuthor().getAsTag()).queue(); - event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) - .setTitle("Successfully set region") - .setDescription("I successfully set the new server region to US West.") - .build()).queue(); + setRegion(Region.US_WEST, "US West", event); break; case "us-south": - event.getGuild().getManager().setRegion(Region.US_SOUTH).reason("Region changed by " + event.getAuthor().getAsTag()).queue(); - event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) - .setTitle("Successfully set region") - .setDescription("I successfully set the new server region to US South.") - .build()).queue(); + setRegion(Region.US_SOUTH, "US South", event); break; case "list": event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) @@ -159,6 +87,14 @@ public class RegionChangeCommand implements Command { .build()).queue(); } + public void setRegion (Region region, String region_name, CommandEvent event) { + event.getGuild().getManager().setRegion(region).reason("Region changed by " + event.getAuthor().getAsTag()).queue(); + event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) + .setTitle("Successfully set region") + .setDescription("I successfully set the new server region to " + region_name + ".") + .build()).queue(); + } + @Override public String[] labels() { return new String[]{"changeregion", "cr", "change-region"}; From 1104a403155778f3550f6b9a463ea8ec5a177216 Mon Sep 17 00:00:00 2001 From: GregTCLTK Date: Tue, 10 Dec 2019 16:35:37 +0100 Subject: [PATCH 17/24] Rules Command Mentioned Role fix #185 --- .../commands/moderation/RulesCommand.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/bbn/hadder/commands/moderation/RulesCommand.java b/src/main/java/com/bbn/hadder/commands/moderation/RulesCommand.java index 07a86b4..063a97c 100644 --- a/src/main/java/com/bbn/hadder/commands/moderation/RulesCommand.java +++ b/src/main/java/com/bbn/hadder/commands/moderation/RulesCommand.java @@ -70,19 +70,17 @@ public class RulesCommand implements Command { .setDescription("The rules were successfully set. Please send me the name of the role which the user receives after he accepted the rules.") .build()).queue(); new EventWaiter().newOnMessageEventWaiter(event3 -> { - if (event.getMessage().getMentionedRoles().size() == 1) { - Role role = event.getMessage().getMentionedRoles().get(0); + if (event3.getMessage().getMentionedRoles().size() == 1) { + Role role = event3.getMessage().getMentionedRoles().get(0); setRole(event, channel, message, event3, role); - } else { - if (event3.getGuild().getRolesByName(event3.getMessage().getContentStripped(), true).size() > 0) { + } else if (event3.getGuild().getRolesByName(event3.getMessage().getContentStripped(), true).size() > 0) { Role role = event3.getGuild().getRolesByName(event3.getMessage().getContentStripped(), true).get(0); setRole(event, channel, message, event3, role); - } else { - event3.getChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.WARNING) - .setTitle("Role does not exist") - .setDescription("The specified role does not exist on this guild.") - .build()).queue(); - } + } else { + event3.getChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.WARNING) + .setTitle("Role does not exist") + .setDescription("The specified role does not exist on this guild.") + .build()).queue(); } }, event.getJDA(), event.getAuthor()); }, event.getJDA(), event.getAuthor()); From 8d61183657b503c3fa9847f10ffcd4fba2975793 Mon Sep 17 00:00:00 2001 From: GregTCLTK Date: Tue, 10 Dec 2019 16:40:33 +0100 Subject: [PATCH 18/24] Join Command Fix --- .../hadder/commands/music/JoinCommand.java | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/bbn/hadder/commands/music/JoinCommand.java b/src/main/java/com/bbn/hadder/commands/music/JoinCommand.java index 6dbb093..7caf2ca 100644 --- a/src/main/java/com/bbn/hadder/commands/music/JoinCommand.java +++ b/src/main/java/com/bbn/hadder/commands/music/JoinCommand.java @@ -19,17 +19,25 @@ public class JoinCommand implements Command { AudioManager audioManager = event.getGuild().getAudioManager(); if(!audioManager.isAttemptingToConnect()) { VoiceChannel vc = event.getMember().getVoiceState().getChannel(); - if (!event.getGuild().getSelfMember().getVoiceState().getChannel().getId().equals(vc.getId())) { + if (event.getGuild().getSelfMember().getVoiceState().inVoiceChannel()) { + if (!event.getGuild().getSelfMember().getVoiceState().getChannel().getId().equals(vc.getId())) { + event.getGuild().getAudioManager().openAudioConnection(vc); + event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) + .setTitle("Successfully connected") + .setDescription("I successfully connected to " + vc.getName() + ".") + .build()).queue(); + } else { + event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.WARNING) + .setTitle("Already connected") + .setDescription("I am already connected to your voice channel.") + .build()).queue(); + } + } else { event.getGuild().getAudioManager().openAudioConnection(vc); event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) .setTitle("Successfully connected") .setDescription("I successfully connected to " + vc.getName() + ".") .build()).queue(); - } else { - event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.WARNING) - .setTitle("Already connected") - .setDescription("I am already connected to your voice channel.") - .build()).queue(); } } else { event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.WARNING) From 0ba08856f184946abb6d74c8ad35f5446cb56b1b Mon Sep 17 00:00:00 2001 From: GregTCLTK Date: Tue, 10 Dec 2019 17:00:38 +0100 Subject: [PATCH 19/24] Finish language command --- .../commands/settings/LanguageCommand.java | 34 +++++++++++++++---- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/bbn/hadder/commands/settings/LanguageCommand.java b/src/main/java/com/bbn/hadder/commands/settings/LanguageCommand.java index ce450f1..4faa2c6 100644 --- a/src/main/java/com/bbn/hadder/commands/settings/LanguageCommand.java +++ b/src/main/java/com/bbn/hadder/commands/settings/LanguageCommand.java @@ -14,12 +14,26 @@ public class LanguageCommand implements Command { public void executed(String[] args, CommandEvent event) { if (args.length == 1) { switch (args[0].toLowerCase()) { - case "DE": - event.getRethink().setLanguage(event.getAuthor().getId(), "DE"); - event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) - .setTitle("Language set") - .setDescription("German is your new language now.") - .build()).queue(); + case "de": + setLanguage("de", "German", event); + break; + case "en": + setLanguage("en", "English", event); + break; + case "es": + setLanguage("es", "Spanish", event); + break; + case "fr": + setLanguage("fr", "French", event); + break; + case "ru": + setLanguage("ru", "Russian", event); + break; + case "tr": + setLanguage("tr", "Turkish", event); + break; + case "zh": + setLanguage("zh", "Chinese", event); break; } } else { @@ -27,6 +41,14 @@ public class LanguageCommand implements Command { } } + public void setLanguage(String language_code, String language , CommandEvent event) { + event.getRethink().setLanguage(event.getAuthor().getId(), language_code); + event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) + .setTitle("Language set") + .setDescription(language + " is your new language now.") + .build()).queue(); + } + @Override public String[] labels() { return new String[]{"language"}; From 0b15e23fa94971555ba3f84f5a77b108d6aff019 Mon Sep 17 00:00:00 2001 From: GregTCLTK Date: Tue, 10 Dec 2019 17:21:22 +0100 Subject: [PATCH 20/24] Rethink language fix --- src/main/java/com/bbn/hadder/Rethink.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/bbn/hadder/Rethink.java b/src/main/java/com/bbn/hadder/Rethink.java index ac894cf..ccbebdd 100644 --- a/src/main/java/com/bbn/hadder/Rethink.java +++ b/src/main/java/com/bbn/hadder/Rethink.java @@ -143,11 +143,11 @@ public class Rethink { } public void insertGuild(String id) { - this.insert("server", r.hashMap("id", id).with("prefix", "h.").with("links", "[]").with("linkchannel", "").with("message_id", "").with("role_id", "").with("invite_detect", false).with("language", "EN")); + this.insert("server", r.hashMap("id", id).with("prefix", "h.").with("links", "[]").with("linkchannel", "").with("message_id", "").with("role_id", "").with("invite_detect", false)); } public void insertUser(String id) { - this.insert("user", r.hashMap("id", id).with("prefix", "h.")); + this.insert("user", r.hashMap("id", id).with("prefix", "h.").with("language", "en")); } public void updateRules(String guild_id, String message_id, String role_id, String accept_emote, String decline_emote) { From 48a5c5a075bb43f1639d30a8dc27bc9bcf887ae6 Mon Sep 17 00:00:00 2001 From: GregTCLTK Date: Tue, 10 Dec 2019 17:38:29 +0100 Subject: [PATCH 21/24] Translation files moved --- src/main/Translations/de/de.properties | 119 ------------------ src/main/Translations/en/en.properties | 119 ------------------ src/main/Translations/es/es.properties | 119 ------------------ src/main/Translations/fr/fr.properties | 119 ------------------ src/main/Translations/ru/ru.properties | 119 ------------------ src/main/Translations/tr/tr.properties | 119 ------------------ src/main/Translations/zh/zh.properties | 119 ------------------ src/main/resources/Translations_de.properties | 0 .../Translations_en.properties} | 0 src/main/resources/Translations_es.properties | 0 src/main/resources/Translations_fr.properties | 0 src/main/resources/Translations_ru.properties | 0 src/main/resources/Translations_tr.properties | 0 src/main/resources/Translations_zh.properties | 0 14 files changed, 833 deletions(-) delete mode 100644 src/main/Translations/de/de.properties delete mode 100644 src/main/Translations/en/en.properties delete mode 100644 src/main/Translations/es/es.properties delete mode 100644 src/main/Translations/fr/fr.properties delete mode 100644 src/main/Translations/ru/ru.properties delete mode 100644 src/main/Translations/tr/tr.properties delete mode 100644 src/main/Translations/zh/zh.properties create mode 100644 src/main/resources/Translations_de.properties rename src/main/{Translations/en_us.properties => resources/Translations_en.properties} (100%) create mode 100644 src/main/resources/Translations_es.properties create mode 100644 src/main/resources/Translations_fr.properties create mode 100644 src/main/resources/Translations_ru.properties create mode 100644 src/main/resources/Translations_tr.properties create mode 100644 src/main/resources/Translations_zh.properties diff --git a/src/main/Translations/de/de.properties b/src/main/Translations/de/de.properties deleted file mode 100644 index e6f8a54..0000000 --- a/src/main/Translations/de/de.properties +++ /dev/null @@ -1,119 +0,0 @@ -# -# @author Skidder / GregTCLTK -# - -Hadder=Hadderino - -user/id= <@User>/ -searchterm= -username= -number= -guildprefix= -<@User>=<@User> -on/off= -vc-name/id= -user+nickname=<@user> - -error=Error -none=None -success\!=Success\! - -commands.fun.avatar.success.title=Avatar of -commands.fun.avatar.help.description=Sends the avatar of the specified member. -commands.fun.gif.error.description=Please try again with another term. -commands.fun.gif.help.description=Look for a GIF on Giphy -commands.fun.meme.success.title=Your random meme -commands.fun.meme.api.error=The request to the meme API could not be processed. Please try it again later. -commands.fun.meme.help.description=Sends you a random meme. - -commands.general.about.success.title=Hadder - About -commands.general.about.success.description=Hadder is an open source Discord bot. -commands.general.about.success.field.one.title=Support the Developers -commands.general.about.success.field.one.description=Hadder is completely free for everyone. We would appreciate it you donate some money [here] -commands.general.about.help.description=Shows infos about Hadder -commands.general.equals.string.first.request=Please send me the first String -commands.general.equals.string.second.request=Please send me the second String -commands.general.equals.string.equals.true=Yes\! The first string equals the second string\! -commands.general.equals.string.equals.false=Well yes but actually No. This isn't the same. -commands.general.equals.string.first=First String -commands.general.equals.string.second=Second String -commands.general.equals.string.result=Result -commands.general.equals.help.description=Check if two strings are the same -commands.general.help.error.description=I need the Embed Links Permission to send the Help Menu\! -commands.general.help.help.description=Shows each command or explains its usage -commands.general.help.help.label=[CommandName] -commands.general.invite.success.title=Invite me\! -commands.general.invite.success.description=[Invite me here\!] -commands.general.invite.help.description=Shows the invitation to invite Hadder to your server -commands.general.ping.help.description=Shows the ping to the Discord API - -commands.misc.feedback.title.request.title=Feedback Topic -commands.misc.feedback.title.request.description=Please send me the feedback topic. -commands.misc.feedback.description.request.title=Feedback Description -commands.misc.feedback.description.request.description=Please send me the feedback description now. -commands.misc.feedback.help.description=Sends feedback directly to the developers. -commands.misc.github.link.title=Link your GitHub Account -commands.misc.github.success.title=Information about -commands.misc.github.success.bio=User bio -commands.misc.github.success.location=Location -commands.misc.github.success.website=Website -commands.misc.github.success.repositories=Public repositories -commands.misc.github.success.gists=Public gists -commands.misc.github.success.followers=Followers -commands.misc.github.success.following=Following -commands.misc.github.api.error.description=The GitHub API might be down at the moment\! -commands.misc.github.user.error.description=This user does not exist\! -commands.misc.github.connect.title=Connect you GH account -commands.misc.github.connect.description=Please connect your GitHub account here -commands.misc.github.help.description=Displays information about a GitHub user profile. -commands.misc.screenshare.success.title=Here's your Url to share your Screen -commands.misc.screenshare.id.error.title=Wait that's illegal -commands.misc.screenshare.id.error.description=This ID is invalid. \nMaybe you entered a wrong ID? \n\nNote\: Make sure the Voice Channel is on this Guild. -commands.misc.screenshare.channel.error.title=Please Choose a Voice Channel -commands.misc.screenshare.channel.error.description=There is more than one channel with this name -commands.misc.screenshare.number.error.title=You specified a wrong number\! -commands.misc.screenshare.number.error.description=This isn't a Number. -commands.misc.screenshare.channel.existing.error=Hol' up -commands.misc.screenshare.channel.existing.description=There is no Voice Channel named like this. \n\nNote\: Make sure the Voice Channel is on this Guild. -commands.misc.screenshare.help.description=Shows you the link to share your screen. - -commands.moderation.ban.success.title=Successfully banned -commands.moderation.ban.success.description=I successfully baned -commands.moderation.ban.error.title=Not possible -commands.moderation.ban.myself.error.description=I can not ban myself\! -commands.moderation.ban.yourself.error.description=You can't ban yourself\! -commands.moderation.ban.help.description=Bans one ore more user from the server -commands.moderation.clear.number.error.description=You have to choose a number between 1 and 200\! -commands.moderation.clear.success.description=Successfully deleted 69 messages. -commands.moderation.clear.help.description=Deletes the specified number of messages. -commands.moderation.prefix.success.title=Successfully set -commands.moderation.prefix.success.description=I successfully set the new prefix for the guild to -commands.moderation.prefix.error.description=The prefix must not contain **** -commands.moderation.prefix.help.description=Sets the Guild-Prefix. -commands.moderation.invitedetect.activate.success.title=Successfully activated -commands.moderation.invitedetect.activate.success.description=I successfully activated the invite link detection for this guild. -commands.moderation.invitedetect.activate.error.title=Already activated -commands.moderation.invitedetect.activate.error.description=The invite link detection is already activated on this guild. -commands.moderation.invitedetect.deactivate.success.title=Successfully deactivated -commands.moderation.invitedetect.deactivate.success.description=I successfully deactivated the invite link detection for this guild. -commands.moderation.invitedetect.deactivate.error.title=Already deactivated -commands.moderation.invitedetect.deactivate.error.description=The invite link detection is already deactivated on this guild. -commands.moderation.invitedetect.help.description=Activate or deactivate the Discord invite link detection. -commands.moderation.kick.success.title=Successfully kicked -commands.moderation.kick.success.description=I successfully kicked -commands.moderation.kick.myself.error.description=I can not kick myself\! -commands.moderation.kick.yourself.error.description=You can't kick yourself. -commands.moderation.kick.mass.success.description=I successfully kicked 69 Members\! -commands.moderation.kick.help.description=Kicks one or more user from the server. -commands.moderation.link.request.success.description=If i'm on this guild i sent a message to accept the link. -commands.moderation.link.error.title=Wait that's illegal. -commands.moderation.link.request.error.description=You specified the same guild as the guild on which you're reading this -commands.moderation.link.request.accept.title=Skidder wants to link guilds\! -commands.moderation.link.request.accept.description=React with the reactions to accept or decline it -commands.moderation.link.set.title=Set the thing boi -commands.moderation.link.help.description=Links two or more servers. -commands.moderation.nick.success.title=Successfully nicked -commands.moderation.nick.success.description=I successfully nicked -commands.moderation.nick.myself.success.description=I successfully changed my nickname. -commands.moderation.nick.mass.success.description=I successfully nicked 69 Members\! -commands.moderation.nick.help.description=Rename a one or more user. diff --git a/src/main/Translations/en/en.properties b/src/main/Translations/en/en.properties deleted file mode 100644 index b7fd562..0000000 --- a/src/main/Translations/en/en.properties +++ /dev/null @@ -1,119 +0,0 @@ -# -# @author Skidder / GregTCLTK -# - -Hadder=Hadder - -user/id= <@User>/ -searchterm= -username= -number= -guildprefix= -<@User>=<@User> -on/off= -vc-name/id= -user+nickname=<@user> - -error=Error -none=None -success\!=Success\! - -commands.fun.avatar.success.title=Avatar of -commands.fun.avatar.help.description=Sends the avatar of the specified member. -commands.fun.gif.error.description=Please try again with another term. -commands.fun.gif.help.description=Look for a GIF on Giphy -commands.fun.meme.success.title=Your random meme -commands.fun.meme.api.error=The request to the meme API could not be processed. Please try it again later. -commands.fun.meme.help.description=Sends you a random meme. - -commands.general.about.success.title=Hadder - About -commands.general.about.success.description=Hadder is an open source Discord bot. -commands.general.about.success.field.one.title=Support the Developers -commands.general.about.success.field.one.description=Hadder is completely free for everyone. We would appreciate it you donate some money [here] -commands.general.about.help.description=Shows infos about Hadder -commands.general.equals.string.first.request=Please send me the first String -commands.general.equals.string.second.request=Please send me the second String -commands.general.equals.string.equals.true=Yes\! The first string equals the second string\! -commands.general.equals.string.equals.false=Well yes but actually No. This isn't the same. -commands.general.equals.string.first=First String -commands.general.equals.string.second=Second String -commands.general.equals.string.result=Result -commands.general.equals.help.description=Check if two strings are the same -commands.general.help.error.description=I need the Embed Links Permission to send the Help Menu\! -commands.general.help.help.description=Shows each command or explains its usage -commands.general.help.help.label=[CommandName] -commands.general.invite.success.title=Invite me\! -commands.general.invite.success.description=[Invite me here\!] -commands.general.invite.help.description=Shows the invitation to invite Hadder to your server -commands.general.ping.help.description=Shows the ping to the Discord API - -commands.misc.feedback.title.request.title=Feedback Topic -commands.misc.feedback.title.request.description=Please send me the feedback topic. -commands.misc.feedback.description.request.title=Feedback Description -commands.misc.feedback.description.request.description=Please send me the feedback description now. -commands.misc.feedback.help.description=Sends feedback directly to the developers. -commands.misc.github.link.title=Link your GitHub Account -commands.misc.github.success.title=Information about -commands.misc.github.success.bio=User bio -commands.misc.github.success.location=Location -commands.misc.github.success.website=Website -commands.misc.github.success.repositories=Public repositories -commands.misc.github.success.gists=Public gists -commands.misc.github.success.followers=Followers -commands.misc.github.success.following=Following -commands.misc.github.api.error.description=The GitHub API might be down at the moment\! -commands.misc.github.user.error.description=This user does not exist\! -commands.misc.github.connect.title=Connect you GH account -commands.misc.github.connect.description=Please connect your GitHub account here -commands.misc.github.help.description=Displays information about a GitHub user profile. -commands.misc.screenshare.success.title=Here's your Url to share your Screen -commands.misc.screenshare.id.error.title=Wait that's illegal -commands.misc.screenshare.id.error.description=This ID is invalid. \nMaybe you entered a wrong ID? \n\nNote\: Make sure the Voice Channel is on this Guild. -commands.misc.screenshare.channel.error.title=Please Choose a Voice Channel -commands.misc.screenshare.channel.error.description=There is more than one channel with this name -commands.misc.screenshare.number.error.title=You specified a wrong number\! -commands.misc.screenshare.number.error.description=This isn't a Number. -commands.misc.screenshare.channel.existing.error=Hol' up -commands.misc.screenshare.channel.existing.description=There is no Voice Channel named like this. \n\nNote\: Make sure the Voice Channel is on this Guild. -commands.misc.screenshare.help.description=Shows you the link to share your screen. - -commands.moderation.ban.success.title=Successfully banned -commands.moderation.ban.success.description=I successfully baned -commands.moderation.ban.error.title=Not possible -commands.moderation.ban.myself.error.description=I can not ban myself\! -commands.moderation.ban.yourself.error.description=You can't ban yourself\! -commands.moderation.ban.help.description=Bans one ore more user from the server -commands.moderation.clear.number.error.description=You have to choose a number between 1 and 200\! -commands.moderation.clear.success.description=Successfully deleted 69 messages. -commands.moderation.clear.help.description=Deletes the specified number of messages. -commands.moderation.prefix.success.title=Successfully set -commands.moderation.prefix.success.description=I successfully set the new prefix for the guild to -commands.moderation.prefix.error.description=The prefix must not contain **** -commands.moderation.prefix.help.description=Sets the Guild-Prefix. -commands.moderation.invitedetect.activate.success.title=Successfully activated -commands.moderation.invitedetect.activate.success.description=I successfully activated the invite link detection for this guild. -commands.moderation.invitedetect.activate.error.title=Already activated -commands.moderation.invitedetect.activate.error.description=The invite link detection is already activated on this guild. -commands.moderation.invitedetect.deactivate.success.title=Successfully deactivated -commands.moderation.invitedetect.deactivate.success.description=I successfully deactivated the invite link detection for this guild. -commands.moderation.invitedetect.deactivate.error.title=Already deactivated -commands.moderation.invitedetect.deactivate.error.description=The invite link detection is already deactivated on this guild. -commands.moderation.invitedetect.help.description=Activate or deactivate the Discord invite link detection. -commands.moderation.kick.success.title=Successfully kicked -commands.moderation.kick.success.description=I successfully kicked -commands.moderation.kick.myself.error.description=I can not kick myself\! -commands.moderation.kick.yourself.error.description=You can't kick yourself. -commands.moderation.kick.mass.success.description=I successfully kicked 69 Members\! -commands.moderation.kick.help.description=Kicks one or more user from the server. -commands.moderation.link.request.success.description=If i'm on this guild i sent a message to accept the link. -commands.moderation.link.error.title=Wait that's illegal. -commands.moderation.link.request.error.description=You specified the same guild as the guild on which you're reading this -commands.moderation.link.request.accept.title=Skidder wants to link guilds\! -commands.moderation.link.request.accept.description=React with the reactions to accept or decline it -commands.moderation.link.set.title=Set the thing boi -commands.moderation.link.help.description=Links two or more servers. -commands.moderation.nick.success.title=Successfully nicked -commands.moderation.nick.success.description=I successfully nicked -commands.moderation.nick.myself.success.description=I successfully changed my nickname. -commands.moderation.nick.mass.success.description=I successfully nicked 69 Members\! -commands.moderation.nick.help.description=Rename a one or more user. diff --git a/src/main/Translations/es/es.properties b/src/main/Translations/es/es.properties deleted file mode 100644 index b7fd562..0000000 --- a/src/main/Translations/es/es.properties +++ /dev/null @@ -1,119 +0,0 @@ -# -# @author Skidder / GregTCLTK -# - -Hadder=Hadder - -user/id= <@User>/ -searchterm= -username= -number= -guildprefix= -<@User>=<@User> -on/off= -vc-name/id= -user+nickname=<@user> - -error=Error -none=None -success\!=Success\! - -commands.fun.avatar.success.title=Avatar of -commands.fun.avatar.help.description=Sends the avatar of the specified member. -commands.fun.gif.error.description=Please try again with another term. -commands.fun.gif.help.description=Look for a GIF on Giphy -commands.fun.meme.success.title=Your random meme -commands.fun.meme.api.error=The request to the meme API could not be processed. Please try it again later. -commands.fun.meme.help.description=Sends you a random meme. - -commands.general.about.success.title=Hadder - About -commands.general.about.success.description=Hadder is an open source Discord bot. -commands.general.about.success.field.one.title=Support the Developers -commands.general.about.success.field.one.description=Hadder is completely free for everyone. We would appreciate it you donate some money [here] -commands.general.about.help.description=Shows infos about Hadder -commands.general.equals.string.first.request=Please send me the first String -commands.general.equals.string.second.request=Please send me the second String -commands.general.equals.string.equals.true=Yes\! The first string equals the second string\! -commands.general.equals.string.equals.false=Well yes but actually No. This isn't the same. -commands.general.equals.string.first=First String -commands.general.equals.string.second=Second String -commands.general.equals.string.result=Result -commands.general.equals.help.description=Check if two strings are the same -commands.general.help.error.description=I need the Embed Links Permission to send the Help Menu\! -commands.general.help.help.description=Shows each command or explains its usage -commands.general.help.help.label=[CommandName] -commands.general.invite.success.title=Invite me\! -commands.general.invite.success.description=[Invite me here\!] -commands.general.invite.help.description=Shows the invitation to invite Hadder to your server -commands.general.ping.help.description=Shows the ping to the Discord API - -commands.misc.feedback.title.request.title=Feedback Topic -commands.misc.feedback.title.request.description=Please send me the feedback topic. -commands.misc.feedback.description.request.title=Feedback Description -commands.misc.feedback.description.request.description=Please send me the feedback description now. -commands.misc.feedback.help.description=Sends feedback directly to the developers. -commands.misc.github.link.title=Link your GitHub Account -commands.misc.github.success.title=Information about -commands.misc.github.success.bio=User bio -commands.misc.github.success.location=Location -commands.misc.github.success.website=Website -commands.misc.github.success.repositories=Public repositories -commands.misc.github.success.gists=Public gists -commands.misc.github.success.followers=Followers -commands.misc.github.success.following=Following -commands.misc.github.api.error.description=The GitHub API might be down at the moment\! -commands.misc.github.user.error.description=This user does not exist\! -commands.misc.github.connect.title=Connect you GH account -commands.misc.github.connect.description=Please connect your GitHub account here -commands.misc.github.help.description=Displays information about a GitHub user profile. -commands.misc.screenshare.success.title=Here's your Url to share your Screen -commands.misc.screenshare.id.error.title=Wait that's illegal -commands.misc.screenshare.id.error.description=This ID is invalid. \nMaybe you entered a wrong ID? \n\nNote\: Make sure the Voice Channel is on this Guild. -commands.misc.screenshare.channel.error.title=Please Choose a Voice Channel -commands.misc.screenshare.channel.error.description=There is more than one channel with this name -commands.misc.screenshare.number.error.title=You specified a wrong number\! -commands.misc.screenshare.number.error.description=This isn't a Number. -commands.misc.screenshare.channel.existing.error=Hol' up -commands.misc.screenshare.channel.existing.description=There is no Voice Channel named like this. \n\nNote\: Make sure the Voice Channel is on this Guild. -commands.misc.screenshare.help.description=Shows you the link to share your screen. - -commands.moderation.ban.success.title=Successfully banned -commands.moderation.ban.success.description=I successfully baned -commands.moderation.ban.error.title=Not possible -commands.moderation.ban.myself.error.description=I can not ban myself\! -commands.moderation.ban.yourself.error.description=You can't ban yourself\! -commands.moderation.ban.help.description=Bans one ore more user from the server -commands.moderation.clear.number.error.description=You have to choose a number between 1 and 200\! -commands.moderation.clear.success.description=Successfully deleted 69 messages. -commands.moderation.clear.help.description=Deletes the specified number of messages. -commands.moderation.prefix.success.title=Successfully set -commands.moderation.prefix.success.description=I successfully set the new prefix for the guild to -commands.moderation.prefix.error.description=The prefix must not contain **** -commands.moderation.prefix.help.description=Sets the Guild-Prefix. -commands.moderation.invitedetect.activate.success.title=Successfully activated -commands.moderation.invitedetect.activate.success.description=I successfully activated the invite link detection for this guild. -commands.moderation.invitedetect.activate.error.title=Already activated -commands.moderation.invitedetect.activate.error.description=The invite link detection is already activated on this guild. -commands.moderation.invitedetect.deactivate.success.title=Successfully deactivated -commands.moderation.invitedetect.deactivate.success.description=I successfully deactivated the invite link detection for this guild. -commands.moderation.invitedetect.deactivate.error.title=Already deactivated -commands.moderation.invitedetect.deactivate.error.description=The invite link detection is already deactivated on this guild. -commands.moderation.invitedetect.help.description=Activate or deactivate the Discord invite link detection. -commands.moderation.kick.success.title=Successfully kicked -commands.moderation.kick.success.description=I successfully kicked -commands.moderation.kick.myself.error.description=I can not kick myself\! -commands.moderation.kick.yourself.error.description=You can't kick yourself. -commands.moderation.kick.mass.success.description=I successfully kicked 69 Members\! -commands.moderation.kick.help.description=Kicks one or more user from the server. -commands.moderation.link.request.success.description=If i'm on this guild i sent a message to accept the link. -commands.moderation.link.error.title=Wait that's illegal. -commands.moderation.link.request.error.description=You specified the same guild as the guild on which you're reading this -commands.moderation.link.request.accept.title=Skidder wants to link guilds\! -commands.moderation.link.request.accept.description=React with the reactions to accept or decline it -commands.moderation.link.set.title=Set the thing boi -commands.moderation.link.help.description=Links two or more servers. -commands.moderation.nick.success.title=Successfully nicked -commands.moderation.nick.success.description=I successfully nicked -commands.moderation.nick.myself.success.description=I successfully changed my nickname. -commands.moderation.nick.mass.success.description=I successfully nicked 69 Members\! -commands.moderation.nick.help.description=Rename a one or more user. diff --git a/src/main/Translations/fr/fr.properties b/src/main/Translations/fr/fr.properties deleted file mode 100644 index b7fd562..0000000 --- a/src/main/Translations/fr/fr.properties +++ /dev/null @@ -1,119 +0,0 @@ -# -# @author Skidder / GregTCLTK -# - -Hadder=Hadder - -user/id= <@User>/ -searchterm= -username= -number= -guildprefix= -<@User>=<@User> -on/off= -vc-name/id= -user+nickname=<@user> - -error=Error -none=None -success\!=Success\! - -commands.fun.avatar.success.title=Avatar of -commands.fun.avatar.help.description=Sends the avatar of the specified member. -commands.fun.gif.error.description=Please try again with another term. -commands.fun.gif.help.description=Look for a GIF on Giphy -commands.fun.meme.success.title=Your random meme -commands.fun.meme.api.error=The request to the meme API could not be processed. Please try it again later. -commands.fun.meme.help.description=Sends you a random meme. - -commands.general.about.success.title=Hadder - About -commands.general.about.success.description=Hadder is an open source Discord bot. -commands.general.about.success.field.one.title=Support the Developers -commands.general.about.success.field.one.description=Hadder is completely free for everyone. We would appreciate it you donate some money [here] -commands.general.about.help.description=Shows infos about Hadder -commands.general.equals.string.first.request=Please send me the first String -commands.general.equals.string.second.request=Please send me the second String -commands.general.equals.string.equals.true=Yes\! The first string equals the second string\! -commands.general.equals.string.equals.false=Well yes but actually No. This isn't the same. -commands.general.equals.string.first=First String -commands.general.equals.string.second=Second String -commands.general.equals.string.result=Result -commands.general.equals.help.description=Check if two strings are the same -commands.general.help.error.description=I need the Embed Links Permission to send the Help Menu\! -commands.general.help.help.description=Shows each command or explains its usage -commands.general.help.help.label=[CommandName] -commands.general.invite.success.title=Invite me\! -commands.general.invite.success.description=[Invite me here\!] -commands.general.invite.help.description=Shows the invitation to invite Hadder to your server -commands.general.ping.help.description=Shows the ping to the Discord API - -commands.misc.feedback.title.request.title=Feedback Topic -commands.misc.feedback.title.request.description=Please send me the feedback topic. -commands.misc.feedback.description.request.title=Feedback Description -commands.misc.feedback.description.request.description=Please send me the feedback description now. -commands.misc.feedback.help.description=Sends feedback directly to the developers. -commands.misc.github.link.title=Link your GitHub Account -commands.misc.github.success.title=Information about -commands.misc.github.success.bio=User bio -commands.misc.github.success.location=Location -commands.misc.github.success.website=Website -commands.misc.github.success.repositories=Public repositories -commands.misc.github.success.gists=Public gists -commands.misc.github.success.followers=Followers -commands.misc.github.success.following=Following -commands.misc.github.api.error.description=The GitHub API might be down at the moment\! -commands.misc.github.user.error.description=This user does not exist\! -commands.misc.github.connect.title=Connect you GH account -commands.misc.github.connect.description=Please connect your GitHub account here -commands.misc.github.help.description=Displays information about a GitHub user profile. -commands.misc.screenshare.success.title=Here's your Url to share your Screen -commands.misc.screenshare.id.error.title=Wait that's illegal -commands.misc.screenshare.id.error.description=This ID is invalid. \nMaybe you entered a wrong ID? \n\nNote\: Make sure the Voice Channel is on this Guild. -commands.misc.screenshare.channel.error.title=Please Choose a Voice Channel -commands.misc.screenshare.channel.error.description=There is more than one channel with this name -commands.misc.screenshare.number.error.title=You specified a wrong number\! -commands.misc.screenshare.number.error.description=This isn't a Number. -commands.misc.screenshare.channel.existing.error=Hol' up -commands.misc.screenshare.channel.existing.description=There is no Voice Channel named like this. \n\nNote\: Make sure the Voice Channel is on this Guild. -commands.misc.screenshare.help.description=Shows you the link to share your screen. - -commands.moderation.ban.success.title=Successfully banned -commands.moderation.ban.success.description=I successfully baned -commands.moderation.ban.error.title=Not possible -commands.moderation.ban.myself.error.description=I can not ban myself\! -commands.moderation.ban.yourself.error.description=You can't ban yourself\! -commands.moderation.ban.help.description=Bans one ore more user from the server -commands.moderation.clear.number.error.description=You have to choose a number between 1 and 200\! -commands.moderation.clear.success.description=Successfully deleted 69 messages. -commands.moderation.clear.help.description=Deletes the specified number of messages. -commands.moderation.prefix.success.title=Successfully set -commands.moderation.prefix.success.description=I successfully set the new prefix for the guild to -commands.moderation.prefix.error.description=The prefix must not contain **** -commands.moderation.prefix.help.description=Sets the Guild-Prefix. -commands.moderation.invitedetect.activate.success.title=Successfully activated -commands.moderation.invitedetect.activate.success.description=I successfully activated the invite link detection for this guild. -commands.moderation.invitedetect.activate.error.title=Already activated -commands.moderation.invitedetect.activate.error.description=The invite link detection is already activated on this guild. -commands.moderation.invitedetect.deactivate.success.title=Successfully deactivated -commands.moderation.invitedetect.deactivate.success.description=I successfully deactivated the invite link detection for this guild. -commands.moderation.invitedetect.deactivate.error.title=Already deactivated -commands.moderation.invitedetect.deactivate.error.description=The invite link detection is already deactivated on this guild. -commands.moderation.invitedetect.help.description=Activate or deactivate the Discord invite link detection. -commands.moderation.kick.success.title=Successfully kicked -commands.moderation.kick.success.description=I successfully kicked -commands.moderation.kick.myself.error.description=I can not kick myself\! -commands.moderation.kick.yourself.error.description=You can't kick yourself. -commands.moderation.kick.mass.success.description=I successfully kicked 69 Members\! -commands.moderation.kick.help.description=Kicks one or more user from the server. -commands.moderation.link.request.success.description=If i'm on this guild i sent a message to accept the link. -commands.moderation.link.error.title=Wait that's illegal. -commands.moderation.link.request.error.description=You specified the same guild as the guild on which you're reading this -commands.moderation.link.request.accept.title=Skidder wants to link guilds\! -commands.moderation.link.request.accept.description=React with the reactions to accept or decline it -commands.moderation.link.set.title=Set the thing boi -commands.moderation.link.help.description=Links two or more servers. -commands.moderation.nick.success.title=Successfully nicked -commands.moderation.nick.success.description=I successfully nicked -commands.moderation.nick.myself.success.description=I successfully changed my nickname. -commands.moderation.nick.mass.success.description=I successfully nicked 69 Members\! -commands.moderation.nick.help.description=Rename a one or more user. diff --git a/src/main/Translations/ru/ru.properties b/src/main/Translations/ru/ru.properties deleted file mode 100644 index b7fd562..0000000 --- a/src/main/Translations/ru/ru.properties +++ /dev/null @@ -1,119 +0,0 @@ -# -# @author Skidder / GregTCLTK -# - -Hadder=Hadder - -user/id= <@User>/ -searchterm= -username= -number= -guildprefix= -<@User>=<@User> -on/off= -vc-name/id= -user+nickname=<@user> - -error=Error -none=None -success\!=Success\! - -commands.fun.avatar.success.title=Avatar of -commands.fun.avatar.help.description=Sends the avatar of the specified member. -commands.fun.gif.error.description=Please try again with another term. -commands.fun.gif.help.description=Look for a GIF on Giphy -commands.fun.meme.success.title=Your random meme -commands.fun.meme.api.error=The request to the meme API could not be processed. Please try it again later. -commands.fun.meme.help.description=Sends you a random meme. - -commands.general.about.success.title=Hadder - About -commands.general.about.success.description=Hadder is an open source Discord bot. -commands.general.about.success.field.one.title=Support the Developers -commands.general.about.success.field.one.description=Hadder is completely free for everyone. We would appreciate it you donate some money [here] -commands.general.about.help.description=Shows infos about Hadder -commands.general.equals.string.first.request=Please send me the first String -commands.general.equals.string.second.request=Please send me the second String -commands.general.equals.string.equals.true=Yes\! The first string equals the second string\! -commands.general.equals.string.equals.false=Well yes but actually No. This isn't the same. -commands.general.equals.string.first=First String -commands.general.equals.string.second=Second String -commands.general.equals.string.result=Result -commands.general.equals.help.description=Check if two strings are the same -commands.general.help.error.description=I need the Embed Links Permission to send the Help Menu\! -commands.general.help.help.description=Shows each command or explains its usage -commands.general.help.help.label=[CommandName] -commands.general.invite.success.title=Invite me\! -commands.general.invite.success.description=[Invite me here\!] -commands.general.invite.help.description=Shows the invitation to invite Hadder to your server -commands.general.ping.help.description=Shows the ping to the Discord API - -commands.misc.feedback.title.request.title=Feedback Topic -commands.misc.feedback.title.request.description=Please send me the feedback topic. -commands.misc.feedback.description.request.title=Feedback Description -commands.misc.feedback.description.request.description=Please send me the feedback description now. -commands.misc.feedback.help.description=Sends feedback directly to the developers. -commands.misc.github.link.title=Link your GitHub Account -commands.misc.github.success.title=Information about -commands.misc.github.success.bio=User bio -commands.misc.github.success.location=Location -commands.misc.github.success.website=Website -commands.misc.github.success.repositories=Public repositories -commands.misc.github.success.gists=Public gists -commands.misc.github.success.followers=Followers -commands.misc.github.success.following=Following -commands.misc.github.api.error.description=The GitHub API might be down at the moment\! -commands.misc.github.user.error.description=This user does not exist\! -commands.misc.github.connect.title=Connect you GH account -commands.misc.github.connect.description=Please connect your GitHub account here -commands.misc.github.help.description=Displays information about a GitHub user profile. -commands.misc.screenshare.success.title=Here's your Url to share your Screen -commands.misc.screenshare.id.error.title=Wait that's illegal -commands.misc.screenshare.id.error.description=This ID is invalid. \nMaybe you entered a wrong ID? \n\nNote\: Make sure the Voice Channel is on this Guild. -commands.misc.screenshare.channel.error.title=Please Choose a Voice Channel -commands.misc.screenshare.channel.error.description=There is more than one channel with this name -commands.misc.screenshare.number.error.title=You specified a wrong number\! -commands.misc.screenshare.number.error.description=This isn't a Number. -commands.misc.screenshare.channel.existing.error=Hol' up -commands.misc.screenshare.channel.existing.description=There is no Voice Channel named like this. \n\nNote\: Make sure the Voice Channel is on this Guild. -commands.misc.screenshare.help.description=Shows you the link to share your screen. - -commands.moderation.ban.success.title=Successfully banned -commands.moderation.ban.success.description=I successfully baned -commands.moderation.ban.error.title=Not possible -commands.moderation.ban.myself.error.description=I can not ban myself\! -commands.moderation.ban.yourself.error.description=You can't ban yourself\! -commands.moderation.ban.help.description=Bans one ore more user from the server -commands.moderation.clear.number.error.description=You have to choose a number between 1 and 200\! -commands.moderation.clear.success.description=Successfully deleted 69 messages. -commands.moderation.clear.help.description=Deletes the specified number of messages. -commands.moderation.prefix.success.title=Successfully set -commands.moderation.prefix.success.description=I successfully set the new prefix for the guild to -commands.moderation.prefix.error.description=The prefix must not contain **** -commands.moderation.prefix.help.description=Sets the Guild-Prefix. -commands.moderation.invitedetect.activate.success.title=Successfully activated -commands.moderation.invitedetect.activate.success.description=I successfully activated the invite link detection for this guild. -commands.moderation.invitedetect.activate.error.title=Already activated -commands.moderation.invitedetect.activate.error.description=The invite link detection is already activated on this guild. -commands.moderation.invitedetect.deactivate.success.title=Successfully deactivated -commands.moderation.invitedetect.deactivate.success.description=I successfully deactivated the invite link detection for this guild. -commands.moderation.invitedetect.deactivate.error.title=Already deactivated -commands.moderation.invitedetect.deactivate.error.description=The invite link detection is already deactivated on this guild. -commands.moderation.invitedetect.help.description=Activate or deactivate the Discord invite link detection. -commands.moderation.kick.success.title=Successfully kicked -commands.moderation.kick.success.description=I successfully kicked -commands.moderation.kick.myself.error.description=I can not kick myself\! -commands.moderation.kick.yourself.error.description=You can't kick yourself. -commands.moderation.kick.mass.success.description=I successfully kicked 69 Members\! -commands.moderation.kick.help.description=Kicks one or more user from the server. -commands.moderation.link.request.success.description=If i'm on this guild i sent a message to accept the link. -commands.moderation.link.error.title=Wait that's illegal. -commands.moderation.link.request.error.description=You specified the same guild as the guild on which you're reading this -commands.moderation.link.request.accept.title=Skidder wants to link guilds\! -commands.moderation.link.request.accept.description=React with the reactions to accept or decline it -commands.moderation.link.set.title=Set the thing boi -commands.moderation.link.help.description=Links two or more servers. -commands.moderation.nick.success.title=Successfully nicked -commands.moderation.nick.success.description=I successfully nicked -commands.moderation.nick.myself.success.description=I successfully changed my nickname. -commands.moderation.nick.mass.success.description=I successfully nicked 69 Members\! -commands.moderation.nick.help.description=Rename a one or more user. diff --git a/src/main/Translations/tr/tr.properties b/src/main/Translations/tr/tr.properties deleted file mode 100644 index b7fd562..0000000 --- a/src/main/Translations/tr/tr.properties +++ /dev/null @@ -1,119 +0,0 @@ -# -# @author Skidder / GregTCLTK -# - -Hadder=Hadder - -user/id= <@User>/ -searchterm= -username= -number= -guildprefix= -<@User>=<@User> -on/off= -vc-name/id= -user+nickname=<@user> - -error=Error -none=None -success\!=Success\! - -commands.fun.avatar.success.title=Avatar of -commands.fun.avatar.help.description=Sends the avatar of the specified member. -commands.fun.gif.error.description=Please try again with another term. -commands.fun.gif.help.description=Look for a GIF on Giphy -commands.fun.meme.success.title=Your random meme -commands.fun.meme.api.error=The request to the meme API could not be processed. Please try it again later. -commands.fun.meme.help.description=Sends you a random meme. - -commands.general.about.success.title=Hadder - About -commands.general.about.success.description=Hadder is an open source Discord bot. -commands.general.about.success.field.one.title=Support the Developers -commands.general.about.success.field.one.description=Hadder is completely free for everyone. We would appreciate it you donate some money [here] -commands.general.about.help.description=Shows infos about Hadder -commands.general.equals.string.first.request=Please send me the first String -commands.general.equals.string.second.request=Please send me the second String -commands.general.equals.string.equals.true=Yes\! The first string equals the second string\! -commands.general.equals.string.equals.false=Well yes but actually No. This isn't the same. -commands.general.equals.string.first=First String -commands.general.equals.string.second=Second String -commands.general.equals.string.result=Result -commands.general.equals.help.description=Check if two strings are the same -commands.general.help.error.description=I need the Embed Links Permission to send the Help Menu\! -commands.general.help.help.description=Shows each command or explains its usage -commands.general.help.help.label=[CommandName] -commands.general.invite.success.title=Invite me\! -commands.general.invite.success.description=[Invite me here\!] -commands.general.invite.help.description=Shows the invitation to invite Hadder to your server -commands.general.ping.help.description=Shows the ping to the Discord API - -commands.misc.feedback.title.request.title=Feedback Topic -commands.misc.feedback.title.request.description=Please send me the feedback topic. -commands.misc.feedback.description.request.title=Feedback Description -commands.misc.feedback.description.request.description=Please send me the feedback description now. -commands.misc.feedback.help.description=Sends feedback directly to the developers. -commands.misc.github.link.title=Link your GitHub Account -commands.misc.github.success.title=Information about -commands.misc.github.success.bio=User bio -commands.misc.github.success.location=Location -commands.misc.github.success.website=Website -commands.misc.github.success.repositories=Public repositories -commands.misc.github.success.gists=Public gists -commands.misc.github.success.followers=Followers -commands.misc.github.success.following=Following -commands.misc.github.api.error.description=The GitHub API might be down at the moment\! -commands.misc.github.user.error.description=This user does not exist\! -commands.misc.github.connect.title=Connect you GH account -commands.misc.github.connect.description=Please connect your GitHub account here -commands.misc.github.help.description=Displays information about a GitHub user profile. -commands.misc.screenshare.success.title=Here's your Url to share your Screen -commands.misc.screenshare.id.error.title=Wait that's illegal -commands.misc.screenshare.id.error.description=This ID is invalid. \nMaybe you entered a wrong ID? \n\nNote\: Make sure the Voice Channel is on this Guild. -commands.misc.screenshare.channel.error.title=Please Choose a Voice Channel -commands.misc.screenshare.channel.error.description=There is more than one channel with this name -commands.misc.screenshare.number.error.title=You specified a wrong number\! -commands.misc.screenshare.number.error.description=This isn't a Number. -commands.misc.screenshare.channel.existing.error=Hol' up -commands.misc.screenshare.channel.existing.description=There is no Voice Channel named like this. \n\nNote\: Make sure the Voice Channel is on this Guild. -commands.misc.screenshare.help.description=Shows you the link to share your screen. - -commands.moderation.ban.success.title=Successfully banned -commands.moderation.ban.success.description=I successfully baned -commands.moderation.ban.error.title=Not possible -commands.moderation.ban.myself.error.description=I can not ban myself\! -commands.moderation.ban.yourself.error.description=You can't ban yourself\! -commands.moderation.ban.help.description=Bans one ore more user from the server -commands.moderation.clear.number.error.description=You have to choose a number between 1 and 200\! -commands.moderation.clear.success.description=Successfully deleted 69 messages. -commands.moderation.clear.help.description=Deletes the specified number of messages. -commands.moderation.prefix.success.title=Successfully set -commands.moderation.prefix.success.description=I successfully set the new prefix for the guild to -commands.moderation.prefix.error.description=The prefix must not contain **** -commands.moderation.prefix.help.description=Sets the Guild-Prefix. -commands.moderation.invitedetect.activate.success.title=Successfully activated -commands.moderation.invitedetect.activate.success.description=I successfully activated the invite link detection for this guild. -commands.moderation.invitedetect.activate.error.title=Already activated -commands.moderation.invitedetect.activate.error.description=The invite link detection is already activated on this guild. -commands.moderation.invitedetect.deactivate.success.title=Successfully deactivated -commands.moderation.invitedetect.deactivate.success.description=I successfully deactivated the invite link detection for this guild. -commands.moderation.invitedetect.deactivate.error.title=Already deactivated -commands.moderation.invitedetect.deactivate.error.description=The invite link detection is already deactivated on this guild. -commands.moderation.invitedetect.help.description=Activate or deactivate the Discord invite link detection. -commands.moderation.kick.success.title=Successfully kicked -commands.moderation.kick.success.description=I successfully kicked -commands.moderation.kick.myself.error.description=I can not kick myself\! -commands.moderation.kick.yourself.error.description=You can't kick yourself. -commands.moderation.kick.mass.success.description=I successfully kicked 69 Members\! -commands.moderation.kick.help.description=Kicks one or more user from the server. -commands.moderation.link.request.success.description=If i'm on this guild i sent a message to accept the link. -commands.moderation.link.error.title=Wait that's illegal. -commands.moderation.link.request.error.description=You specified the same guild as the guild on which you're reading this -commands.moderation.link.request.accept.title=Skidder wants to link guilds\! -commands.moderation.link.request.accept.description=React with the reactions to accept or decline it -commands.moderation.link.set.title=Set the thing boi -commands.moderation.link.help.description=Links two or more servers. -commands.moderation.nick.success.title=Successfully nicked -commands.moderation.nick.success.description=I successfully nicked -commands.moderation.nick.myself.success.description=I successfully changed my nickname. -commands.moderation.nick.mass.success.description=I successfully nicked 69 Members\! -commands.moderation.nick.help.description=Rename a one or more user. diff --git a/src/main/Translations/zh/zh.properties b/src/main/Translations/zh/zh.properties deleted file mode 100644 index b7fd562..0000000 --- a/src/main/Translations/zh/zh.properties +++ /dev/null @@ -1,119 +0,0 @@ -# -# @author Skidder / GregTCLTK -# - -Hadder=Hadder - -user/id= <@User>/ -searchterm= -username= -number= -guildprefix= -<@User>=<@User> -on/off= -vc-name/id= -user+nickname=<@user> - -error=Error -none=None -success\!=Success\! - -commands.fun.avatar.success.title=Avatar of -commands.fun.avatar.help.description=Sends the avatar of the specified member. -commands.fun.gif.error.description=Please try again with another term. -commands.fun.gif.help.description=Look for a GIF on Giphy -commands.fun.meme.success.title=Your random meme -commands.fun.meme.api.error=The request to the meme API could not be processed. Please try it again later. -commands.fun.meme.help.description=Sends you a random meme. - -commands.general.about.success.title=Hadder - About -commands.general.about.success.description=Hadder is an open source Discord bot. -commands.general.about.success.field.one.title=Support the Developers -commands.general.about.success.field.one.description=Hadder is completely free for everyone. We would appreciate it you donate some money [here] -commands.general.about.help.description=Shows infos about Hadder -commands.general.equals.string.first.request=Please send me the first String -commands.general.equals.string.second.request=Please send me the second String -commands.general.equals.string.equals.true=Yes\! The first string equals the second string\! -commands.general.equals.string.equals.false=Well yes but actually No. This isn't the same. -commands.general.equals.string.first=First String -commands.general.equals.string.second=Second String -commands.general.equals.string.result=Result -commands.general.equals.help.description=Check if two strings are the same -commands.general.help.error.description=I need the Embed Links Permission to send the Help Menu\! -commands.general.help.help.description=Shows each command or explains its usage -commands.general.help.help.label=[CommandName] -commands.general.invite.success.title=Invite me\! -commands.general.invite.success.description=[Invite me here\!] -commands.general.invite.help.description=Shows the invitation to invite Hadder to your server -commands.general.ping.help.description=Shows the ping to the Discord API - -commands.misc.feedback.title.request.title=Feedback Topic -commands.misc.feedback.title.request.description=Please send me the feedback topic. -commands.misc.feedback.description.request.title=Feedback Description -commands.misc.feedback.description.request.description=Please send me the feedback description now. -commands.misc.feedback.help.description=Sends feedback directly to the developers. -commands.misc.github.link.title=Link your GitHub Account -commands.misc.github.success.title=Information about -commands.misc.github.success.bio=User bio -commands.misc.github.success.location=Location -commands.misc.github.success.website=Website -commands.misc.github.success.repositories=Public repositories -commands.misc.github.success.gists=Public gists -commands.misc.github.success.followers=Followers -commands.misc.github.success.following=Following -commands.misc.github.api.error.description=The GitHub API might be down at the moment\! -commands.misc.github.user.error.description=This user does not exist\! -commands.misc.github.connect.title=Connect you GH account -commands.misc.github.connect.description=Please connect your GitHub account here -commands.misc.github.help.description=Displays information about a GitHub user profile. -commands.misc.screenshare.success.title=Here's your Url to share your Screen -commands.misc.screenshare.id.error.title=Wait that's illegal -commands.misc.screenshare.id.error.description=This ID is invalid. \nMaybe you entered a wrong ID? \n\nNote\: Make sure the Voice Channel is on this Guild. -commands.misc.screenshare.channel.error.title=Please Choose a Voice Channel -commands.misc.screenshare.channel.error.description=There is more than one channel with this name -commands.misc.screenshare.number.error.title=You specified a wrong number\! -commands.misc.screenshare.number.error.description=This isn't a Number. -commands.misc.screenshare.channel.existing.error=Hol' up -commands.misc.screenshare.channel.existing.description=There is no Voice Channel named like this. \n\nNote\: Make sure the Voice Channel is on this Guild. -commands.misc.screenshare.help.description=Shows you the link to share your screen. - -commands.moderation.ban.success.title=Successfully banned -commands.moderation.ban.success.description=I successfully baned -commands.moderation.ban.error.title=Not possible -commands.moderation.ban.myself.error.description=I can not ban myself\! -commands.moderation.ban.yourself.error.description=You can't ban yourself\! -commands.moderation.ban.help.description=Bans one ore more user from the server -commands.moderation.clear.number.error.description=You have to choose a number between 1 and 200\! -commands.moderation.clear.success.description=Successfully deleted 69 messages. -commands.moderation.clear.help.description=Deletes the specified number of messages. -commands.moderation.prefix.success.title=Successfully set -commands.moderation.prefix.success.description=I successfully set the new prefix for the guild to -commands.moderation.prefix.error.description=The prefix must not contain **** -commands.moderation.prefix.help.description=Sets the Guild-Prefix. -commands.moderation.invitedetect.activate.success.title=Successfully activated -commands.moderation.invitedetect.activate.success.description=I successfully activated the invite link detection for this guild. -commands.moderation.invitedetect.activate.error.title=Already activated -commands.moderation.invitedetect.activate.error.description=The invite link detection is already activated on this guild. -commands.moderation.invitedetect.deactivate.success.title=Successfully deactivated -commands.moderation.invitedetect.deactivate.success.description=I successfully deactivated the invite link detection for this guild. -commands.moderation.invitedetect.deactivate.error.title=Already deactivated -commands.moderation.invitedetect.deactivate.error.description=The invite link detection is already deactivated on this guild. -commands.moderation.invitedetect.help.description=Activate or deactivate the Discord invite link detection. -commands.moderation.kick.success.title=Successfully kicked -commands.moderation.kick.success.description=I successfully kicked -commands.moderation.kick.myself.error.description=I can not kick myself\! -commands.moderation.kick.yourself.error.description=You can't kick yourself. -commands.moderation.kick.mass.success.description=I successfully kicked 69 Members\! -commands.moderation.kick.help.description=Kicks one or more user from the server. -commands.moderation.link.request.success.description=If i'm on this guild i sent a message to accept the link. -commands.moderation.link.error.title=Wait that's illegal. -commands.moderation.link.request.error.description=You specified the same guild as the guild on which you're reading this -commands.moderation.link.request.accept.title=Skidder wants to link guilds\! -commands.moderation.link.request.accept.description=React with the reactions to accept or decline it -commands.moderation.link.set.title=Set the thing boi -commands.moderation.link.help.description=Links two or more servers. -commands.moderation.nick.success.title=Successfully nicked -commands.moderation.nick.success.description=I successfully nicked -commands.moderation.nick.myself.success.description=I successfully changed my nickname. -commands.moderation.nick.mass.success.description=I successfully nicked 69 Members\! -commands.moderation.nick.help.description=Rename a one or more user. diff --git a/src/main/resources/Translations_de.properties b/src/main/resources/Translations_de.properties new file mode 100644 index 0000000..e69de29 diff --git a/src/main/Translations/en_us.properties b/src/main/resources/Translations_en.properties similarity index 100% rename from src/main/Translations/en_us.properties rename to src/main/resources/Translations_en.properties diff --git a/src/main/resources/Translations_es.properties b/src/main/resources/Translations_es.properties new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/Translations_fr.properties b/src/main/resources/Translations_fr.properties new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/Translations_ru.properties b/src/main/resources/Translations_ru.properties new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/Translations_tr.properties b/src/main/resources/Translations_tr.properties new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/Translations_zh.properties b/src/main/resources/Translations_zh.properties new file mode 100644 index 0000000..e69de29 From 12f1cdfdcb49e49819c8348d3987df12bb5f9dbe Mon Sep 17 00:00:00 2001 From: GregTCLTK Date: Tue, 10 Dec 2019 17:40:19 +0100 Subject: [PATCH 22/24] MessageEditor Handle funktion --- src/main/java/com/bbn/hadder/utils/MessageEditor.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/com/bbn/hadder/utils/MessageEditor.java b/src/main/java/com/bbn/hadder/utils/MessageEditor.java index de93685..ed72944 100644 --- a/src/main/java/com/bbn/hadder/utils/MessageEditor.java +++ b/src/main/java/com/bbn/hadder/utils/MessageEditor.java @@ -4,6 +4,8 @@ import net.dv8tion.jda.api.EmbedBuilder; import java.awt.*; import java.time.Instant; +import java.util.Locale; +import java.util.ResourceBundle; public class MessageEditor { @@ -59,4 +61,9 @@ public class MessageEditor { NO_PERMISSION, NO_SELF_PERMISSION } + + public static String handle(String language_code, String string) { + Locale locale = new Locale(language_code); + return ResourceBundle.getBundle("Translations", locale).getString(string).replaceAll("%prefix%", "h."); + } } From ec5c7520dc01487499da3289aa858d1f80b6a52e Mon Sep 17 00:00:00 2001 From: GregTCLTK Date: Tue, 10 Dec 2019 17:42:55 +0100 Subject: [PATCH 23/24] Move files again Just for better structure --- src/main/java/com/bbn/hadder/utils/MessageEditor.java | 2 +- .../resources/{ => Translations}/Translations_de.properties | 0 .../resources/{ => Translations}/Translations_en.properties | 0 .../resources/{ => Translations}/Translations_es.properties | 0 .../resources/{ => Translations}/Translations_fr.properties | 0 .../resources/{ => Translations}/Translations_ru.properties | 0 .../resources/{ => Translations}/Translations_tr.properties | 0 .../resources/{ => Translations}/Translations_zh.properties | 0 8 files changed, 1 insertion(+), 1 deletion(-) rename src/main/resources/{ => Translations}/Translations_de.properties (100%) rename src/main/resources/{ => Translations}/Translations_en.properties (100%) rename src/main/resources/{ => Translations}/Translations_es.properties (100%) rename src/main/resources/{ => Translations}/Translations_fr.properties (100%) rename src/main/resources/{ => Translations}/Translations_ru.properties (100%) rename src/main/resources/{ => Translations}/Translations_tr.properties (100%) rename src/main/resources/{ => Translations}/Translations_zh.properties (100%) diff --git a/src/main/java/com/bbn/hadder/utils/MessageEditor.java b/src/main/java/com/bbn/hadder/utils/MessageEditor.java index ed72944..b514d6d 100644 --- a/src/main/java/com/bbn/hadder/utils/MessageEditor.java +++ b/src/main/java/com/bbn/hadder/utils/MessageEditor.java @@ -64,6 +64,6 @@ public class MessageEditor { public static String handle(String language_code, String string) { Locale locale = new Locale(language_code); - return ResourceBundle.getBundle("Translations", locale).getString(string).replaceAll("%prefix%", "h."); + return ResourceBundle.getBundle("Translations/Translations", locale).getString(string).replaceAll("%prefix%", "h."); } } diff --git a/src/main/resources/Translations_de.properties b/src/main/resources/Translations/Translations_de.properties similarity index 100% rename from src/main/resources/Translations_de.properties rename to src/main/resources/Translations/Translations_de.properties diff --git a/src/main/resources/Translations_en.properties b/src/main/resources/Translations/Translations_en.properties similarity index 100% rename from src/main/resources/Translations_en.properties rename to src/main/resources/Translations/Translations_en.properties diff --git a/src/main/resources/Translations_es.properties b/src/main/resources/Translations/Translations_es.properties similarity index 100% rename from src/main/resources/Translations_es.properties rename to src/main/resources/Translations/Translations_es.properties diff --git a/src/main/resources/Translations_fr.properties b/src/main/resources/Translations/Translations_fr.properties similarity index 100% rename from src/main/resources/Translations_fr.properties rename to src/main/resources/Translations/Translations_fr.properties diff --git a/src/main/resources/Translations_ru.properties b/src/main/resources/Translations/Translations_ru.properties similarity index 100% rename from src/main/resources/Translations_ru.properties rename to src/main/resources/Translations/Translations_ru.properties diff --git a/src/main/resources/Translations_tr.properties b/src/main/resources/Translations/Translations_tr.properties similarity index 100% rename from src/main/resources/Translations_tr.properties rename to src/main/resources/Translations/Translations_tr.properties diff --git a/src/main/resources/Translations_zh.properties b/src/main/resources/Translations/Translations_zh.properties similarity index 100% rename from src/main/resources/Translations_zh.properties rename to src/main/resources/Translations/Translations_zh.properties From 8a88b0838481cb6986c0eca8f41a1d197d1cdd4f Mon Sep 17 00:00:00 2001 From: GregTCLTK Date: Tue, 10 Dec 2019 17:43:52 +0100 Subject: [PATCH 24/24] Crowdin update --- crowdin.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crowdin.yml b/crowdin.yml index b5c6ef4..981b8c9 100644 --- a/crowdin.yml +++ b/crowdin.yml @@ -1,5 +1,5 @@ base_url: 'https://bigbotnetwork.com' commit_message: '[ci skip] New %language% translation' files: - - source: /src/main/Translations/en_us.properties - translation: /src/main/Translations/%two_letters_code%/%two_letters_code%.properties + - source: /src/main/resources/Translations/Translations_en.properties + translation: /src/main/resources/Translations/Translations_%two_letters_code%.properties