|
@@ -3,7 +3,7 @@ from typing import Optional
|
|
|
import random
|
|
|
|
|
|
from rollbot import as_command, initialize_data, RollbotFailure
|
|
|
-from rollbot.injection import Data, Sender, Config, Const, Arg
|
|
|
+from rollbot.injection import Data, Sender, Config, Const, Arg, Reply
|
|
|
|
|
|
# View
|
|
|
# !wallet - shows your number of rollcoins, NFTs (Non-Functional Tamagotchis), and market balance
|
|
@@ -77,8 +77,8 @@ MarketMessages = Config("rollcoin.market.messages")
|
|
|
|
|
|
|
|
|
@as_command
|
|
|
-def wallet(sender_wallet: SenderWallet):
|
|
|
- return f"You currently own...\n{sender_wallet}"
|
|
|
+def wallet(sender_wallet: SenderWallet, reply: Reply):
|
|
|
+ return f"You currently own...\n{sender_wallet}", reply
|
|
|
|
|
|
|
|
|
@as_command
|
|
@@ -148,6 +148,7 @@ async def bet(
|
|
|
multipliers: MarketMultipliers,
|
|
|
messages: MarketMessages,
|
|
|
amount: Arg(0, convert=convert_amount, missing_msg="You must provide an amount to bet!", fail_msg="Could not parse {} as value"),
|
|
|
+ reply: Reply,
|
|
|
):
|
|
|
if not isinstance(amount, float):
|
|
|
# handle special converters
|
|
@@ -169,7 +170,7 @@ async def bet(
|
|
|
|
|
|
await evolve_market(state, transitions, multipliers, wallet_store, state_store)
|
|
|
|
|
|
- return f"{messages[state.market_state]}\n{await wallet_store.load(sender_id)}"
|
|
|
+ return f"{messages[state.market_state]}\n{await wallet_store.load(sender_id)}", reply
|
|
|
|
|
|
|
|
|
@as_command
|
|
@@ -183,6 +184,7 @@ async def cash(
|
|
|
multipliers: MarketMultipliers,
|
|
|
messages: MarketMessages,
|
|
|
amount: Arg(0, convert=convert_amount, missing_msg="You must provide an amount to bet!", fail_msg="Could not parse {} as value"),
|
|
|
+ reply: Reply,
|
|
|
):
|
|
|
if not isinstance(amount, float):
|
|
|
# handle special converters
|
|
@@ -224,4 +226,4 @@ async def cash(
|
|
|
|
|
|
await evolve_market(state, transitions, multipliers, wallet_store, state_store)
|
|
|
|
|
|
- return f"{response}\n{messages[state.market_state]}\n{await wallet_store.load(sender_id)}"
|
|
|
+ return f"{response}\n{messages[state.market_state]}\n{await wallet_store.load(sender_id)}", reply
|