From 887a494509edaed54161cdf002e0dca5cc7b4560 Mon Sep 17 00:00:00 2001 From: GregTCLTK Date: Thu, 30 Jan 2020 08:07:57 +0100 Subject: [PATCH] Real stats about a server --- .../hadder/commands/misc/ServerStatsCommand.java | 16 +++++++++------- .../Translations/Translations_en.properties | 2 ++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/bbn/hadder/commands/misc/ServerStatsCommand.java b/src/main/java/com/bbn/hadder/commands/misc/ServerStatsCommand.java index f8af606..bad5c30 100644 --- a/src/main/java/com/bbn/hadder/commands/misc/ServerStatsCommand.java +++ b/src/main/java/com/bbn/hadder/commands/misc/ServerStatsCommand.java @@ -18,16 +18,18 @@ package com.bbn.hadder.commands.misc; import com.bbn.hadder.commands.Command; import com.bbn.hadder.commands.CommandEvent; +import com.bbn.hadder.utils.MessageEditor; public class ServerStatsCommand implements Command { @Override public void executed(String[] args, CommandEvent e) { - if (args.length == 0) { - - } else if (args.length == 1) { - - } else e.getHelpCommand().sendHelp(this, e); + e.getTextChannel().sendMessage(e.getMessageEditor().getMessage(MessageEditor.MessageType.INFO, + "commands.misc.serverstats.title", "", + "commands.misc.serverstats.description", e.getGuild().getName()) + .addField("Owner", e.getGuild().getOwner().getUser().getAsTag(), false) + .addField("ID", e.getGuild().getId(), false) + .build()).queue(); } @Override @@ -42,11 +44,11 @@ public class ServerStatsCommand implements Command { @Override public String usage() { - return "[Server-ID]"; + return null; } @Override public String example() { - return "448554629282922527"; + return null; } } diff --git a/src/main/resources/Translations/Translations_en.properties b/src/main/resources/Translations/Translations_en.properties index 054727a..aa667ef 100644 --- a/src/main/resources/Translations/Translations_en.properties +++ b/src/main/resources/Translations/Translations_en.properties @@ -87,6 +87,8 @@ 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 in this Guild. commands.misc.screenshare.help.description = Shows you the link to share your screen. +commands.misc.serverstats.title = Serverstats +commands.misc.serverstats.description = This message contains some information about `%extra%` commands.misc.serverstats.help.description = Shows information about a server. commands.moderation.ban.success.title = Successfully banned