From b828702de8724217ceabee178b33e30fffeaa07a Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Thu, 15 Feb 2024 22:29:49 +0100 Subject: Fix personal bank pattern --- src/main/kotlin/moe/nea/ledger/BankDetection.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/kotlin/moe') diff --git a/src/main/kotlin/moe/nea/ledger/BankDetection.kt b/src/main/kotlin/moe/nea/ledger/BankDetection.kt index 3e37658..8aa557d 100644 --- a/src/main/kotlin/moe/nea/ledger/BankDetection.kt +++ b/src/main/kotlin/moe/nea/ledger/BankDetection.kt @@ -5,9 +5,9 @@ import java.util.regex.Pattern class BankDetection(val ledger: LedgerLogger) { val withdrawPattern = - Pattern.compile("^You have withdrawn (?$SHORT_NUMBER_PATTERN) coins?! You now have (?$SHORT_NUMBER_PATTERN) coins? in your account!$") + Pattern.compile("^(You have withdrawn|Withdrew) (?$SHORT_NUMBER_PATTERN) coins?! (?:There's now|You now have) (?$SHORT_NUMBER_PATTERN) coins? (?:lef in the account!|in your account!)$") val depositPattern = - Pattern.compile("^You have deposited (?$SHORT_NUMBER_PATTERN) coins?! You now have (?$SHORT_NUMBER_PATTERN) coins? in your account!$") + Pattern.compile("^(?:You have deposited|Deposited) (?$SHORT_NUMBER_PATTERN) coins?! (?:There's now|You now have) (?$SHORT_NUMBER_PATTERN) coins? (?:in your account!|in the account!)$") @SubscribeEvent fun onChat(event: ChatReceived) { withdrawPattern.useMatcher(event.message) { -- cgit