From a9e42aaf788f639540808c262cdc0d8603e7cd30 Mon Sep 17 00:00:00 2001 From: "William M." Date: Sun, 21 Apr 2024 12:46:21 -0500 Subject: [PATCH] Tweak log messages --- pom.xml | 2 +- src/main/java/com/cominatyou/commands/Submit.java | 2 +- .../java/com/cominatyou/util/versioning/Version.java | 4 ++-- src/main/java/com/cominatyou/xp/XPSystem.java | 10 +++++----- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index 3d7d04f..d492f4a 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.cominatyou hildabot - 2.5.2 + 2.5.3 hildabot http://www.example.com diff --git a/src/main/java/com/cominatyou/commands/Submit.java b/src/main/java/com/cominatyou/commands/Submit.java index b7b13b3..b646ca1 100644 --- a/src/main/java/com/cominatyou/commands/Submit.java +++ b/src/main/java/com/cominatyou/commands/Submit.java @@ -123,7 +123,7 @@ public void execute(MessageCreateEvent message, List messageArgs) { .setFooter("Tokens can be used with the /store command."); message.getChannel().sendMessage(embed); - Log.eventf("Submit", "Successfully accepted submission from %s (%d) in <#%d>. (Submission ID: %d)" , message.getMessageAuthor().getName(), message.getMessageAuthor().getId(), message.getChannel().getId(), message.getMessage().getId()); + Log.eventf("Submit", "Successfully processed submission from %s (%d) in <#%d>. (Submission ID: %d)" , message.getMessageAuthor().getName(), message.getMessageAuthor().getId(), message.getChannel().getId(), message.getMessage().getId()); XPSystem.checkForLevelUp(currentLevel, message.getMessageAuthor().asUser().get(), message.getServer().get()); } diff --git a/src/main/java/com/cominatyou/util/versioning/Version.java b/src/main/java/com/cominatyou/util/versioning/Version.java index 9a8a357..e241527 100644 --- a/src/main/java/com/cominatyou/util/versioning/Version.java +++ b/src/main/java/com/cominatyou/util/versioning/Version.java @@ -1,7 +1,7 @@ package com.cominatyou.util.versioning; public class Version { - public static final String VERSION = "2.5.2"; - public static final String BUILD_NUMBER = "11F043"; + public static final String VERSION = "2.5.3"; + public static final String BUILD_NUMBER = "11F044"; public static final String VERSION_STRING = String.format("%s (%s)", VERSION, BUILD_NUMBER); } diff --git a/src/main/java/com/cominatyou/xp/XPSystem.java b/src/main/java/com/cominatyou/xp/XPSystem.java index 5383340..c6e4bde 100644 --- a/src/main/java/com/cominatyou/xp/XPSystem.java +++ b/src/main/java/com/cominatyou/xp/XPSystem.java @@ -70,23 +70,23 @@ public static void checkForLevelUp(int beforeActionLevel, User user, Server serv .setDescription("To disable this message going forward, run `h!levelalert` in this DM or <#495034452422950915>."); try { user.openPrivateChannel().join().sendMessage(embed); - Log.eventf("LevelAlert", "Sent level up message to %s (%d)", user.getName(), user.getId()); + Log.eventf("LevelAlert", "Sent level up message to %s", user.getName()); } catch (Exception e) { - if (e.getMessage().contains("Cannot send messages to this user")) { - Log.eventf("LevelAlert", "No message was sent to %s (%d) as their privacy settings prevent it.", user.getName(), user.getId()); + if (e.getMessage().contains("Cannot send messages to this user")) { // Target user has DMs off for the server + Log.eventf("LevelAlert", "No message was sent to %s as their privacy settings prevent it.", user.getName()); } else { e.printStackTrace(); final StringWriter sw = new StringWriter(); e.printStackTrace(new PrintWriter(sw)); - Log.error("LevelAlert", String.format("Failed to send level up message to %s (%d)", user.getName(), user.getId()), sw.toString()); + Log.error("LevelAlert", String.format("Failed to send level up message to %s.", user.getName()), sw.toString()); } } } else { - Log.eventf("LevelAlert", "Not sending a message to %s (%d) as they have level alerts off.", user.getName(), user.getId()); + Log.eventf("LevelAlert", "Not sending a message to %s as they have level alerts off.", user.getName()); } if (RankUtil.isLevelRankLevel(currentLevel)) {