mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-03-27 14:23:56 +00:00
[AB-xxx] making regex checks ignore case
This commit is contained in:
@@ -40,7 +40,7 @@ import java.util.stream.Collectors;
|
||||
@Slf4j
|
||||
public class MessageEmbedServiceBean implements MessageEmbedService {
|
||||
|
||||
private final Pattern messageRegex = Pattern.compile("(?<whole>(?:https?://)?(?:\\w+\\.)?discord(?:app)?\\.com/channels/(?<server>\\d+)/(?<channel>\\d+)/(?<message>\\d+)(?:.*?))+");
|
||||
private final Pattern messageRegex = Pattern.compile("(?<whole>(?:https?://)?(?:\\w+\\.)?discord(?:app)?\\.com/channels/(?<server>\\d+)/(?<channel>\\d+)/(?<message>\\d+)(?:.*?))+", Pattern.CASE_INSENSITIVE);
|
||||
|
||||
public static final String MESSAGE_EMBED_TEMPLATE = "message_embed";
|
||||
public static final String REMOVAL_EMOTE = "removeEmbed";
|
||||
|
||||
@@ -143,7 +143,7 @@ public class ProfanityServiceBean implements ProfanityService {
|
||||
}
|
||||
|
||||
private void loadProfanityRegex(ProfanityRegex profanityRegex, Long serverId) {
|
||||
Pattern pattern = Pattern.compile(profanityRegex.getRegex());
|
||||
Pattern pattern = Pattern.compile(profanityRegex.getRegex(), Pattern.CASE_INSENSITIVE);
|
||||
List<PatternReplacement> newPatterns = new ArrayList<>();
|
||||
PatternReplacement patternReplacement = PatternReplacement
|
||||
.builder()
|
||||
|
||||
Reference in New Issue
Block a user