Skip to content

Commit 0872b10

Browse files
committed
fix
1 parent 5ab7962 commit 0872b10

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

src/main/java/net/discordjug/javabot/data/config/GuildConfig.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class GuildConfig {
3838
private StarboardConfig starboardConfig;
3939
private MessageCacheConfig messageCacheConfig;
4040
private ServerLockConfig serverLockConfig;
41-
private List<String> blacklistedMessageExtensions;
41+
private List<String> blacklistedMessageExtensions = List.of("jar", "exe", "zip");
4242

4343
/**
4444
* Constructor that initializes all Config classes.
@@ -56,7 +56,6 @@ public GuildConfig(Guild guild, Path file) {
5656
this.starboardConfig = new StarboardConfig();
5757
this.messageCacheConfig = new MessageCacheConfig();
5858
this.serverLockConfig = new ServerLockConfig();
59-
this.blacklistedMessageExtensions = List.of("jar", "exe", "zip");
6059
this.setGuild(guild);
6160
}
6261

src/main/java/net/discordjug/javabot/listener/filter/BlacklistedMessageAttachmentFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import java.util.List;
1313

1414
/**
15-
* This {@link MessageFilter} blocks attachments blacklisted using {@link GuildConfig#getBlacklistedMessageExtensions()}.
15+
* This {@link MessageFilter} blocks attachments blacklisted using {@link GuildConfig}.
1616
*/
1717
@Component
1818
@RequiredArgsConstructor

src/main/java/net/discordjug/javabot/listener/filter/MessageContent.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
import java.util.List;
88

99
/**
10-
* A class storing different parameters of a message sent.
11-
* @param event The event associated with the message
10+
* A class containing modifiable content of a message that has been received.
11+
* @param event The event associated with receiving the message
1212
* @param messageText The text associated with the message
1313
* @param attachments The attachments associated with the message
1414
* @param embeds The embeds associated with the message

src/main/java/net/discordjug/javabot/listener/filter/MessageFilter.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
/**
44
* This interface is implemented by all message filters.
55
*
6-
* The {@link MessageContent} is processed through every class implementing {@link MessageFilter}
7-
* unless one of the filters returns {@link MessageModificationStatus#STOP_PROCESSING} which stops further filters from processing.
6+
* The {@link MessageContent} is processed by every class implementing {@link MessageFilter}
7+
* unless one of the filters returns {@link MessageModificationStatus#STOP_PROCESSING} which stops further filters from executing.
88
*/
99
public interface MessageFilter {
1010

1111
/**
12-
* When a message is received, it is executed on the registered filters.
12+
* When a message is received, it is processed on the registered filters.
1313
*
1414
* @param content The content of the new message that will be reposted instead of the received message
1515
* if at least one filter returns {@link MessageModificationStatus#MODIFIED}
1616
* and no filter returns {@link MessageModificationStatus#STOP_PROCESSING}.
1717
* This {@link MessageContent} is built up incrementally by the filters.
1818
* @return the appropriate {@link MessageModificationStatus} based on the filter's processing.
19-
* @see MessageFilterHandler for the implementation of the filters.
19+
* @see MessageFilterHandler
2020
*/
2121
MessageModificationStatus processMessage(MessageContent content);
2222

0 commit comments

Comments
 (0)