mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-03 14:38:51 +00:00
Fix incorrect hardcoded prefix in ping handler
This commit is contained in:
1 parent
960c139c74
commit
666e5eb8ac
1 file changed
+2
-1
@@ -79,7 +79,8 @@ public class PingHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return message.replaceText(TextReplacementConfig.builder()
|
return message.replaceText(TextReplacementConfig.builder()
|
||||||
.match(Pattern.compile(String.format("\\B(@%s|@%s)\\b", recipient.username(), displayName), Pattern.CASE_INSENSITIVE))
|
// \B(@Username|@Displayname)\b
|
||||||
|
.match(Pattern.compile(String.format("\\B(%1$2s%2$2s|%1$2s%3$2s)\\b", prefix, recipient.username(), displayName), Pattern.CASE_INSENSITIVE))
|
||||||
.replacement(matchedText -> {
|
.replacement(matchedText -> {
|
||||||
if (this.configFactory.primaryConfig().pings().playSound()) {
|
if (this.configFactory.primaryConfig().pings().playSound()) {
|
||||||
recipient.playSound(this.configFactory.primaryConfig().pings().sound());
|
recipient.playSound(this.configFactory.primaryConfig().pings().sound());
|
||||||
|
|||||||
Reference in new issue
Block a user