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 0abe35a..4de31b3 100644 --- a/src/main/java/com/bbn/hadder/commands/fun/GifCommand.java +++ b/src/main/java/com/bbn/hadder/commands/fun/GifCommand.java @@ -37,7 +37,7 @@ public class GifCommand implements Command { String url = array.getJSONObject(gifIndex).get("url").toString(); event.getTextChannel().sendMessage(url).queue(); } catch (Exception e) { - event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.ERROR).setTitle("Error").setDescription(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.fun.gif.error.description")).build()).queue(); + event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.ERROR).setTitle(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "error")).setDescription(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.fun.gif.error.description")).build()).queue(); } } else event.getHelpCommand().sendHelp(this, event); } diff --git a/src/main/java/com/bbn/hadder/commands/general/AboutCommand.java b/src/main/java/com/bbn/hadder/commands/general/AboutCommand.java index 2512d2f..2050712 100644 --- a/src/main/java/com/bbn/hadder/commands/general/AboutCommand.java +++ b/src/main/java/com/bbn/hadder/commands/general/AboutCommand.java @@ -15,7 +15,7 @@ public class AboutCommand implements Command { event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) .setTitle(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.general.about.success.title")) .setDescription(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.general.about.success.description")) - .addField(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.general.about.success.field.one.title"), MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.general.about.success.field.one.description") + "(https://donatebot.io/checkout/448554629282922527?buyer=" + event.getAuthor().getId() + "). :smiley:", true) + .addField(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.general.about.success.field.one.title"), MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.general.about.success.field.one.description", "(https://donatebot.io/checkout/448554629282922527?buyer=" + event.getAuthor().getId() + "). :smiley:"), true) .setThumbnail("https://bigbotnetwork.com/images/Hadder.png") .build()).queue(); } 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 aeb53b0..14934aa 100644 --- a/src/main/java/com/bbn/hadder/commands/general/HelpCommand.java +++ b/src/main/java/com/bbn/hadder/commands/general/HelpCommand.java @@ -61,7 +61,7 @@ public class HelpCommand implements Command { 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", event.getRethink().getUserPrefix(event.getAuthor().getId()) + cmd.labels()[0] + " " + cmd.usage(), false); + eb.addField(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.general.help.field.usage"), event.getRethink().getUserPrefix(event.getAuthor().getId()) + cmd.labels()[0] + " " + cmd.usage(), false); new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO); event.getChannel().sendMessage(eb.build()).queue(); } diff --git a/src/main/java/com/bbn/hadder/commands/general/InviteCommand.java b/src/main/java/com/bbn/hadder/commands/general/InviteCommand.java index e761514..7b17bb7 100644 --- a/src/main/java/com/bbn/hadder/commands/general/InviteCommand.java +++ b/src/main/java/com/bbn/hadder/commands/general/InviteCommand.java @@ -15,7 +15,7 @@ public class InviteCommand implements Command { public void executed(String[] args, CommandEvent event) { event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) .setTitle(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.general.invite.success.title")) - .setDescription(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.general.invite.success.description") + "(https://discordapp.com/oauth2/authorize?client_id=" + Hadder.shardManager.getGuilds().get(0).getSelfMember().getId() + "&scope=bot&permissions=470133879)") + .setDescription(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.general.invite.success.description", "(https://discordapp.com/oauth2/authorize?client_id=" + Hadder.shardManager.getGuilds().get(0).getSelfMember().getId() + "&scope=bot&permissions=470133879)")) .build()).queue(); } diff --git a/src/main/java/com/bbn/hadder/commands/general/PingCommand.java b/src/main/java/com/bbn/hadder/commands/general/PingCommand.java index a4b691b..b5e8c01 100644 --- a/src/main/java/com/bbn/hadder/commands/general/PingCommand.java +++ b/src/main/java/com/bbn/hadder/commands/general/PingCommand.java @@ -12,7 +12,11 @@ public class PingCommand implements Command { @Override public void executed(String[] args, CommandEvent event) { - event.getJDA().getRestPing().queue(ping -> event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO).setTitle("Ping").setDescription(String.valueOf(ping)).build()).queue()); + event.getJDA().getRestPing().queue(ping -> event.getTextChannel().sendMessage(new MessageEditor() + .setDefaultSettings(MessageEditor.MessageType.INFO) + .setTitle("Ping") + .setDescription(String.valueOf(ping)) + .build()).queue()); } @Override diff --git a/src/main/java/com/bbn/hadder/commands/misc/FeedbackCommand.java b/src/main/java/com/bbn/hadder/commands/misc/FeedbackCommand.java index f677e31..50394a4 100644 --- a/src/main/java/com/bbn/hadder/commands/misc/FeedbackCommand.java +++ b/src/main/java/com/bbn/hadder/commands/misc/FeedbackCommand.java @@ -35,7 +35,7 @@ public class FeedbackCommand implements Command { GHRepository Hadder = connection.getOrganization("BigBotNetwork").getRepository("Hadder"); GHIssue issue = Hadder.createIssue(title).body("Feedback by " + event.getAuthor().getAsTag() + "
" + description).label("feedback").create(); event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) - .setTitle("Feedback successfully sent") + .setTitle(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.misc.feedback.success.title")) .setDescription(issue.getHtmlUrl().toString()) .build()).queue(); } catch (IOException e) { diff --git a/src/main/java/com/bbn/hadder/commands/misc/GitHubCommand.java b/src/main/java/com/bbn/hadder/commands/misc/GitHubCommand.java index 187c344..8640f1b 100644 --- a/src/main/java/com/bbn/hadder/commands/misc/GitHubCommand.java +++ b/src/main/java/com/bbn/hadder/commands/misc/GitHubCommand.java @@ -45,7 +45,7 @@ public class GitHubCommand implements Command { if (!json.getString("blog").equals("")) website = json.getString("blog"); event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) - .setAuthor(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.misc.github.success.title") + nickname + " (" + args[0] + ")", "https://github.com/" + args[0] + "", "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png") + .setAuthor(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.misc.github.success.title", nickname + " (" + args[0] + ")"), "https://github.com/" + args[0] + "", "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png") .setThumbnail(json.getString("avatar_url")) .addField(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.misc.github.success.bio"), bio, false) .addField(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.misc.github.success.location"), location, true) @@ -65,7 +65,7 @@ public class GitHubCommand implements Command { } else { event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) .setTitle(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.misc.github.connect.title")) - .setDescription(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.misc.github.connect.description") + "(https://github.com/login/oauth/authorize?client_id=25321f690bb1b6952942)") + .setDescription(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.misc.github.connect.description", "(https://github.com/login/oauth/authorize?client_id=25321f690bb1b6952942)")) .build()).queue(); } } 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 ca68aae..d0ebed3 100644 --- a/src/main/java/com/bbn/hadder/commands/moderation/BanCommand.java +++ b/src/main/java/com/bbn/hadder/commands/moderation/BanCommand.java @@ -21,7 +21,7 @@ public class BanCommand implements Command { if (!event.getJDA().getSelfUser().getId().equals(victim.getId())) { if (event.getGuild().getSelfMember().canInteract(victim)) { event.getGuild().ban(victim, 0, "Banned by " + event.getAuthor().getAsTag()).queue(); - event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO).setTitle(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.moderation.ban.success.title")).setDescription(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.moderation.ban.success.description") + victim.getUser().getName() + ".").build()).queue(); + event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO).setTitle(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.moderation.ban.success.title")).setDescription(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.moderation.ban.success.description", victim.getUser().getName() + ".")).build()).queue(); } else { event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.NO_SELF_PERMISSION).build()).queue(); } @@ -50,7 +50,7 @@ public class BanCommand implements Command { event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.WARNING).setTitle(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.moderation.ban.error.title")).setDescription(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.moderation.ban.yourself.error.description")).build()).queue(); } } - event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO).setTitle(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.moderation.ban.success.title")).setDescription(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.moderation.ban.success.description") + event.getMessage().getMentionedMembers().size() + " Members!").build()).queue(); + event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO).setTitle(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.moderation.ban.success.title")).setDescription(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.moderation.ban.success.description", String.valueOf(event.getMessage().getMentionedMembers().size()))).build()).queue(); } } else { event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.NO_PERMISSION).build()).queue(); diff --git a/src/main/resources/Translations/Translations_en.properties b/src/main/resources/Translations/Translations_en.properties index 7a7fc32..e80664d 100644 --- a/src/main/resources/Translations/Translations_en.properties +++ b/src/main/resources/Translations/Translations_en.properties @@ -30,7 +30,7 @@ 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.success.field.one.description = Hadder is completely free for everyone. We would appreciate it you donate some money [here]%extra% 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 @@ -40,11 +40,12 @@ 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.field.usage = Usage 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.success.description = [Invite me here!]%extra% 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 @@ -53,8 +54,9 @@ commands.misc.feedback.title.request.description = Please send me the feedback t 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.feedback.success.title = Feedback successfully sent commands.misc.github.link.title = Link your GitHub Account -commands.misc.github.success.title = Information about +commands.misc.github.success.title = Information about %extra% commands.misc.github.success.bio = User bio commands.misc.github.success.location = Location commands.misc.github.success.website = Website @@ -65,7 +67,7 @@ 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.connect.description = [Please connect your GitHub account here]%extra% 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 @@ -79,10 +81,11 @@ commands.misc.screenshare.channel.existing.description = There is no Voice Chann 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.success.description = I successfully baned %extra% 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 not ban yourself! +commands.moderation.massban.success.description = I successfully baned %extra% Members! 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 99! commands.moderation.clear.success.description = Successfully deleted