diff options
author | Linnea Gräf <nea@nea.moe> | 2024-02-15 22:29:49 +0100 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-02-15 22:29:49 +0100 |
commit | b828702de8724217ceabee178b33e30fffeaa07a (patch) | |
tree | 77bb95be68e16ece3af179bd87f3d5e1f7df4e04 | |
parent | 277643f8c39ad02d9485f7fc9039243f098ec383 (diff) | |
download | LocalTransactionLedger-b828702de8724217ceabee178b33e30fffeaa07a.tar.gz LocalTransactionLedger-b828702de8724217ceabee178b33e30fffeaa07a.tar.bz2 LocalTransactionLedger-b828702de8724217ceabee178b33e30fffeaa07a.zip |
Fix personal bank pattern
-rw-r--r-- | src/main/kotlin/moe/nea/ledger/BankDetection.kt | 4 |
1 files changed, 2 insertions, 2 deletions
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 (?<amount>$SHORT_NUMBER_PATTERN) coins?! You now have (?<newtotal>$SHORT_NUMBER_PATTERN) coins? in your account!$") + Pattern.compile("^(You have withdrawn|Withdrew) (?<amount>$SHORT_NUMBER_PATTERN) coins?! (?:There's now|You now have) (?<newtotal>$SHORT_NUMBER_PATTERN) coins? (?:lef in the account!|in your account!)$") val depositPattern = - Pattern.compile("^You have deposited (?<amount>$SHORT_NUMBER_PATTERN) coins?! You now have (?<newtotal>$SHORT_NUMBER_PATTERN) coins? in your account!$") + Pattern.compile("^(?:You have deposited|Deposited) (?<amount>$SHORT_NUMBER_PATTERN) coins?! (?:There's now|You now have) (?<newtotal>$SHORT_NUMBER_PATTERN) coins? (?:in your account!|in the account!)$") @SubscribeEvent fun onChat(event: ChatReceived) { withdrawPattern.useMatcher(event.message) { |