-
-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for the new transaction command for the garticos transfer…
… endpoint
- Loading branch information
1 parent
1358ed7
commit 8486540
Showing
10 changed files
with
103 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...s/vanilla/economy/transactiontransformers/GarticosTransferSonhosTransactionTransformer.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package net.perfectdreams.loritta.morenitta.interactions.vanilla.economy.transactiontransformers | ||
|
||
import net.perfectdreams.i18nhelper.core.I18nContext | ||
import net.perfectdreams.loritta.morenitta.LorittaBot | ||
import net.perfectdreams.loritta.morenitta.interactions.vanilla.economy.SonhosCommand | ||
import net.perfectdreams.loritta.morenitta.utils.CachedUserInfo | ||
import net.perfectdreams.loritta.serializable.GarticosTransferTransaction | ||
import net.perfectdreams.loritta.serializable.UserId | ||
|
||
object GarticosTransferSonhosTransactionTransformer : SonhosTransactionTransformer<GarticosTransferTransaction> { | ||
override suspend fun transform( | ||
loritta: LorittaBot, | ||
i18nContext: I18nContext, | ||
cachedUserInfo: CachedUserInfo, | ||
cachedUserInfos: MutableMap<UserId, CachedUserInfo?>, | ||
transaction: GarticosTransferTransaction | ||
): suspend StringBuilder.() -> (Unit) = { | ||
appendMoneyEarnedEmoji() | ||
append( | ||
i18nContext.get( | ||
SonhosCommand.TRANSACTIONS_I18N_PREFIX.Types.Garticos.ExchangedFromGarticBot(transaction.garticos, transaction.sonhos) | ||
) | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters