Users can deposit to their SmileyCoinBot balance from personal Smiley Coin wallets by sending to the address given by the bot when the /createwallet or /getaddress command is used.
The SmileyCoinBot watches all incoming transactions to the core wallet and if a transaction is sent to an address belonging to a user the SmileyCoinBot will increase the users balance by the received amount.
List commands
Bot sends a reply visible to other users listing all commands
Create a virtual wallet
Bot checks if the User's wallet exists in the database
-
- Bot sends ephemeral reply to user:
Your user already exists.
- Bot sends ephemeral reply to user:
-
- Bot creates a new user in database and creates new address for user by using the "getnewaddress" command in the smiley core wallet.
- User can deposit smiley coins to address attached to his discord username in database.
Display the balance on your virtual wallet
Bot checks if the user's wallet exists in the database
-
- Bot sends ephemeral reply:
Your balance is ${wallet.balance}
- Bot sends ephemeral reply:
-
- Bot sends ephemeral reply:
You don't have a wallet. Use /createwallet
- Bot sends ephemeral reply:
Get the deposit address to deposit funds to your virtual wallet
Bot checks if the user's wallet exists in the database
-
- Bot sends an ephemeral reply:
${wallet.address}
- Bot sends an ephemeral reply:
-
- Bot sends an ephemeral reply:
Could not find a wallet for user ${interaction.user.tag}. Try `/createwallet` to create a new wallet.
- Bot sends an ephemeral reply:
Set the address to which funds will be withdrawn
address - Your SMLY wallet address
Bot checks if the parameters are empty
-
- Bot sends an ephemeral reply:
Must fill out all parameters. Try again
- Bot sends an ephemeral reply:
-
-
Bot checks if the address is valid by query-ing the core wallet, using
/smileycoin-cli validateaddress <address> -
- Bot sends an ephemeral reply:
Address ${withdraw_address} is invalid. Please enter a valid address.
- Bot sends an ephemeral reply:
-
-
Bot checks if the User's wallet exists in the database
-
- Bot sends an ephemeral reply:
Could not find a wallet with name ${Name}. Try /createwallet to create a new wallet.
- Bot sends an ephemeral reply:
-
- Bot updates the address for the User's virtual wallet in the database with the given address parameter
- Bot sends an ephemeral reply:
Withdraw address was edited.
-
-
Send SMLY to users
amount - Amount to tip
user - User to tip
-
- Bot sends an ephemeral reply:
You're sending to yourself! Nothing happened.
- Bot sends an ephemeral reply:
-
- Bot sends an ephemeral reply:
Must fill out all parameters. Try again
- Bot sends an ephemeral reply:
-
- Bot sends an ephemeral reply:
Could not find a wallet with name ${tag}. Try /createwallet to create a new wallet.
- Bot sends an ephemeral reply:
Bot checks if wallet has enough balance to tip the amount
-
- Bot send an ephemeral reply:
Not enough smileys. Your balance is ${wallet.balance}.
- Bot send an ephemeral reply:
-
- Bot checks if receiver has a wallet
-
- Bot creates a wallet for the receiver
- Bot send a visible reply:
${nickname} transferred ${amount} SMLY to ${user.username}! Claim your SMLY by setting withdrawal address with /setaddress and withdrawing with /withdraw.
-
- Bot sends an ephemeral reply:
Transferred ${amount-1} to ${user.username}. 1 went to transaction fees. Your balance is now ${await wallet.balance - amount}
- Bot sends an ephemeral reply:
-
Bot transfers amount from user's wallet to receiver's wallet
-
- Bot checks if receiver has a wallet
Withdraw funds from virtual wallet
Amount - Amount of SMLY to withdraw
Bot checks if User's wallet exists in database
-
- Bot sends ephemeral message to user:
Could not find a wallet with name <User using /withdraw discord name>. Try /createwallet to create a new wallet.
- Bot sends ephemeral message to user:
-
Bot checks if wallet has a withdrawal address
-
- Bot sends ephemeral reply to user:
You have to set your withdraw address to withdraw funds. Use /setaddress
- Bot sends ephemeral reply to user:
-
Bot compares the amount with the wallet's balance
-
- Bot contacts core wallet to send SMLY to the User's withdraw address equal to amount requested by user.
- Bot sends ephemeral reply to user:
Withdrew <amount - 1> to your wallet. 1 went to transaction fees. Your balance is now <user balance - amount>
-
- Bot sends ephemeral message to user:
Not enough smileys. Your balance is <Users current balance>.
- Bot sends ephemeral message to user:
-
-