Browse Source

Add help messages

Kirk Trombley 3 years ago
parent
commit
8bb3052c37
1 changed files with 40 additions and 0 deletions
  1. 40 0
      commands/commands/rollcoin.py

+ 40 - 0
commands/commands/rollcoin.py

@@ -99,11 +99,17 @@ NameAPIKey = Config("rollcoin.gacha.name_api_key")
 
 @as_command
 def wallet(sender_wallet: SenderWallet, reply: Reply):
+    """
+    View the contents of your wallet. Using this command once will initialize your wallet.
+    """
     return f"You currently own...\n{sender_wallet}", reply
 
 
 @as_command
 async def blockchain(wallets: Data(RollcoinWallet), wallet_lookup: WalletLookup, state: State):
+    """
+    View the contents of everyone's wallets
+    """
     response = f"Blockchain:\n\tTreasury: {state.treasury}\n\n"
     names = {v: k.title() for k, v in wallet_lookup.items()}
     async for (sender_id, wallet) in wallets.all():
@@ -121,6 +127,9 @@ async def tip(
     target_name: Arg(0, missing_msg="You must tell me who to tip!"),
     amount: Arg(1, convert=convert_amount, missing_msg="You must provide an amount to tip!", fail_msg="Could not parse {} as value"),
 ):
+    """
+    Send RollCoins to another person, as in !tip [person] [amount]
+    """
     if not isinstance(amount, float):
         # handle special converters
         amount = amount(sender_wallet.balance)
@@ -154,6 +163,9 @@ async def donate(
     wallet_store: Data(RollcoinWallet),
     amount: Arg(0, convert=convert_amount, missing_msg="You must provide an amount to donate!", fail_msg="Could not parse {} as value"),
 ):
+    """
+    Donate RollCoins to everyone who has a wallet, the number of coins you specify will be divided amongst everyone else.
+    """
     if not isinstance(amount, float):
         # handle special converters
         amount = amount(sender_wallet.balance)
@@ -201,6 +213,9 @@ async def bet(
     amount: Arg(0, convert=convert_amount, missing_msg="You must provide an amount to bet!", fail_msg="Could not parse {} as value"),
     reply: Reply,
 ):
+    """
+    Bet some number of RollCoins on the market. These coins will leave your wallet.
+    """
     if not isinstance(amount, float):
         # handle special converters
         amount = amount(sender_wallet.balance)
@@ -242,6 +257,10 @@ async def cash(
     amount: Arg(0, convert=convert_amount, missing_msg="You must provide an amount to bet!", fail_msg="Could not parse {} as value"),
     reply: Reply,
 ):
+    """
+    Cash some number of RollCoins out of the market. 
+    Because RollCoins are the one true fiat currency, you can only cash out up to the number of coins available in the treasury.
+    """
     if not isinstance(amount, float):
         # handle special converters
         amount = amount(sender_wallet.holdings)
@@ -291,6 +310,9 @@ async def mine(
     state_store: Data(RollcoinState),
     reply: Reply,
 ):
+    """
+    Trade solved Sudokus for RollCoins. Admins can skip the current puzzle with !mine skip
+    """
     async def generate_puzzle():
         exchange = list(zip("abcdefghi", range(10)))
         random.shuffle(exchange)
@@ -383,6 +405,9 @@ async def appraise(
     state_store: Data(RollcoinState),
     reply: Reply,
 ):
+    """
+    Use this command while replying to a popular post, and I will purchase it for some RollCoins!
+    """
     if origin == "GROUPME":
         try:
             reply_attachment = next(a for a in attachments if a.name == "reply")
@@ -432,6 +457,9 @@ async def gacha(
     name_api_key: NameAPIKey,
     reply: Reply,
 ):
+    """
+    Spend one RollCoin on a Non-Functional Tamagotchi! You could get a rare one!
+    """
     if sender_wallet.balance < 1:
         return f"You only have {sender_wallet.balance} RollCoins available, and gacha pulls cost one each!", reply
 
@@ -475,6 +503,9 @@ async def deflate(
     wallet_store: Data(RollcoinWallet),
     state_store: Data(RollcoinState),
 ):
+    """
+    Admins only: Deflate the value of the RollCoin by a factor of 10 to the given power, which can be negative to inflate.
+    """
     if not origin_admin:
         RollbotFailure.PERMISSIONS.raise_exc("Only admins can deflate the currency")
 
@@ -499,6 +530,9 @@ async def brrr(
     coins: Arg(0, convert=float, missing_msg="Must provide coins to mint", fail_msg="Coins to mint by must be a number"),
     state_store: Data(RollcoinState),
 ):
+    """
+    Admins only: Print more RollCoins into the treasury, which can be useful to help the economy! You can also delete them with a negative number
+    """
     if not origin_admin:
         RollbotFailure.PERMISSIONS.raise_exc("Only admins can mint coins")
 
@@ -521,6 +555,9 @@ async def tax(
     wallet_store: Data(RollcoinWallet),
     state_store: Data(RollcoinState),
 ):
+    """
+    Admins only: Tax a user to put some of their RollCoins into the treasury, or use a negative number to provide a rebate
+    """
     if not origin_admin:
         RollbotFailure.PERMISSIONS.raise_exc("Only admins can tax someone")
 
@@ -543,6 +580,9 @@ async def market(
     state_store: Data(RollcoinState),
     messages: MarketMessages,
 ):
+    """
+    Admins only: Force the market into a certain state
+    """
     if not origin_admin:
         RollbotFailure.PERMISSIONS.raise_exc("Only admins can manipulate the market")