Browse Source

Add NFT list command

Kirk Trombley 3 năm trước cách đây
mục cha
commit
ac68e1bd32
1 tập tin đã thay đổi với 10 bổ sung0 xóa
  1. 10 0
      commands/commands/rollcoin.py

+ 10 - 0
commands/commands/rollcoin.py

@@ -11,6 +11,7 @@ from rollbot.injection import Data, Sender, Config, Const, Arg, Reply, OriginAdm
 
 # View
 #   !wallet - shows your number of rollcoins, NFTs (Non-Functional Tamagotchis), and market balance
+#   !nfts - shows your entire list of NFTs
 #   !blockchain - shows the contents of all wallets and the rollcoins in the treasury
 # Generate
 #   !mine - provides a sudoku that can be solved for rollcoins, which also adds to the treasury
@@ -111,6 +112,15 @@ def wallet(sender_wallet: SenderWallet, reply: Reply):
     return f"You currently own...\n{sender_wallet}", reply
 
 
+@as_command
+def nfts(sender_wallet: SenderWallet, reply: Reply):
+    """
+    View the full list of your NFTs.
+    """
+    nfts = '\n\t'.join(sender_wallet.nfts)
+    return f"You currently own...\n\t{nfts}".strip(), reply
+
+
 @as_command
 async def blockchain(wallets: Data(RollcoinWallet), wallet_lookup: WalletLookup, state: State):
     """