asyncdef_help(self,command:str,pubkey:str):awaitself.nostr_client.send_direct_message(pubkey,"""Available commands:!help - Show this help message!balance - Show your balance!deposit [amount] - Deposit sats to your balance""")asyncdef_describe(self,command:str,pubkey:str):agent_info=self.agent_infodescription="I am "+agent_info.name+"\n\nThis is my description:\n\n"+agent_info.descriptionawaitself.nostr_client.send_direct_message(pubkey,description)asyncdef_balance(self,command:str,pubkey:str):user=awaitself.db.get_user(pubkey)awaitself.nostr_client.send_direct_message(pubkey,f"Your balance is {user.available_balance} sats")asyncdef_deposit(self,command:str,pubkey:str):ifnotself.nostr_client.nwc_relay:awaitself.nostr_client.send_direct_message(pubkey,"Nostr Wallet Connect (NWC) is not configured")returnamount=Noneif" "incommand:try:amount=int(command.split()[1])exceptValueError:passinvoice=awaitself.nostr_client.nwc_relay.make_invoice(amount=amount,description="Deposit to your balance")awaitself.nostr_client.send_direct_message(pubkey,invoice)asyncdefon_payment_success():user=awaitself.db.get_user(pubkey)user.available_balance+=amountawaitself.db.upsert_user(user)awaitself.nostr_client.send_direct_message(pubkey,f"Payment successful! Your new balance is {user.available_balance} sats")asyncdefon_payment_failure():awaitself.nostr_client.send_direct_message(pubkey,"Payment failed. Please try again.")awaitself.nostr_client.nwc_relay.on_payment_success(invoice=invoice,callback=on_payment_success,timeout=900,unsuccess_callback=on_payment_failure,)