You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/java/net/javadiscord/javabot/data/config/guild/HelpConfig.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,7 @@ public class HelpConfig extends GuildConfigItem {
55
55
* should use discord's code-formatting, provided the bot detects unformatted code.
56
56
* Issued by {@link net.javadiscord.javabot.systems.help.AutoCodeFormatter}
57
57
*/
58
-
privateStringformatHintMessage = "> Please format your code to make it more readable. \n> For java, it should look like this: \n```\u200B`\u200B`\u200B`\u200Bjava\npublic void foo() {\n\n}\u200B`\u200B`\u200B`\u200B```";
58
+
privateStringformatHintMessage = "> Please format your code to make it more readable. \n> For java, it should look like this: \n```\u200B`\u200B`\u200B`\u200Bjava\npublic void foo() {\n\n}\n\u200B`\u200B`\u200B`\u200B```";
59
59
60
60
/**
61
61
* The message that's sent when a user unreserved a channel where other users
@@ -103,7 +103,7 @@ public class HelpConfig extends GuildConfigItem {
103
103
* The message-embed's footnote of an unformatted-code-replacement.
104
104
* Issued by {@link net.javadiscord.javabot.systems.help.AutoCodeFormatter}
105
105
*/
106
-
privateStringautoformatInfoMessage = "This message has been formatted automatically.";
106
+
privateStringautoFormatInfoMessage = "This message has been formatted automatically.";
107
107
108
108
/**
109
109
* The amount of experience points one gets for being thanked by the help channel owner.
if (event.getAuthor().isBot() || event.getMessage()
71
+
.getAuthor()
72
+
.isSystem()) {
63
73
return;
64
74
}
65
-
if (!Boolean.parseBoolean(preferenceService.getOrCreate(Objects.requireNonNull(event.getMember()).getIdLong(), Preference.FORMAT_UNFORMATTED_CODE).getState())) {
75
+
if (autoMod.hasSuspiciousLink(event.getMessage()) ||
76
+
autoMod.hasAdvertisingLink(event.getMessage())) {
77
+
return;
78
+
}
79
+
if (event.isWebhookMessage()) {
80
+
return;
81
+
}
82
+
if (!event.isFromThread()) {
83
+
return;
84
+
}
85
+
if (event.getChannel()
86
+
.asThreadChannel()
87
+
.getParentChannel()
88
+
.getIdLong() != botConfig.get(event.getGuild())
89
+
.getHelpConfig()
90
+
.getHelpForumChannelId()) {
91
+
return;
92
+
}
93
+
if (!Boolean.parseBoolean(preferenceService.getOrCreate(Objects.requireNonNull(event.getMember())
0 commit comments