Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
onixiya1337 committed Jul 9, 2024
2 parents 592366f + 96f7502 commit 6169ed3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1316,6 +1316,11 @@ public static void triggerManuallyPestsDestroyer() {
description = "Pings everyone on Visitors Macro Logs"
)
public static boolean pingEveryoneOnVisitorsMacroLogs = false;
@Switch(
name = "Send Macro Enable/Disable Logs", category = DISCORD_INTEGRATION, subcategory = "Discord Webhook",
description = "Sends messages when the macro has been enabled or disabled"
)
public static boolean sendMacroEnableDisableLogs = true;
@Text(
name = "WebHook URL", category = DISCORD_INTEGRATION, subcategory = "Discord Webhook",
description = "The URL to use for the webhook",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,9 @@ public void enableMacro() {
LogUtils.sendDebug("Selected macro: " + LogUtils.capitalize(currentMacro.get().getClass().getSimpleName()));
PlayerUtils.closeScreen();
LogUtils.sendSuccess("Macro enabled!");
LogUtils.webhookLog("Macro enabled!");
if (FarmHelperConfig.sendMacroEnableDisableLogs) {
LogUtils.webhookLog("Macro enabled!");
}

analyticsTimer.reset();
Multithreading.schedule(() -> {
Expand All @@ -206,7 +208,9 @@ public void enableMacro() {
public void disableMacro() {
setMacroToggled(false);
LogUtils.sendSuccess("Macro disabled!");
LogUtils.webhookLog("Macro disabled!");
if (FarmHelperConfig.sendMacroEnableDisableLogs) {
LogUtils.webhookLog("Macro disabled!");
}
currentMacro.ifPresent(m -> {
m.setSavedState(Optional.empty());
m.getRotation().reset();
Expand Down

0 comments on commit 6169ed3

Please sign in to comment.