Managing your Discord community with Starton bot
Learn how to manage communities by granting roles and rewarding users. You can verify roles on your Discord server using tokens. The Starton Role bot allows you to use Starton directly from your Discord server! You can give roles to server members according to the tokens they own, fungible (ERC20) or NFTs (ERC721 / ERC1155).
Prerequisites
Connecting your discord server
- Go to Starton Discord Studio.
- Click Connect your server.
Installing the bot
-
Initialize your bot.
/init {{starton-api-key}} {{administrator-role}} {{logging-channel}}
-
starton-api-key
: Starton API key that you can generate on the Starton Dashboard -
administrator-role
: the Discord role that can manage the bot (make sure your account has the specified role) -
logging-channel
: the channel where you want to get the logs
-
-
Import a contract.
/smart-contract import {{network}} {{smart-contract-type}} {{smart-contract-name}} {{smart-contract-address}}
-
network
: the network on which your contract is deployed (ethereum-mainnet
,ethereum-sepolia
,avalance-mainnet
,avalance-fuji
,polygon-mainnet
,polygon-amoy
,binance-mainnet
,binance-testnet
) -
smart-contract-type
: the type of your contract (ERC20
,ERC721
,ERC1155
) -
smart-contract-name
: the name you want to give to your contract -
smart-contract-address
: the address of your contract (0x...
)
-
caution
Your contract must be imported on Starton before using this command. To import your contract, you can call this endpoint or use our web application our web application.
This command returns a contract-id
that you need for the next step.
Verifying roles
-
Put a trigger on your contract
/trigger create {{contract-id}} {{role}}
-
contract-id
is the UUID of the contract you just imported -
role
is the role that you want to give to your user when they
From now, all verified users that have tokens (or NFTs) from the registered contract will have the role you attributed in the command.
-
USER ACTION
Now that your bot is set up, every user on your Discord server can connect his wallet to your bot and get the roles related to their crypto-assets.
/connect-wallet
In the Discord chat, this command will return a link to verify your profile using your Metamask wallet.
List of available commands
You can use the following commands to manage your bot.
CONFIGURATION
Initialize the Starton bot your server
/init
Permission required: Server Administrator
Parameter | Type | Description |
---|---|---|
starton-api-key | String | [Required] Starton API key (sk_live_... ) |
administrator-role | Role | [Required] Role that can manage the Starton bot |
logging-channel | Channel | [Required] Channel used for the logs |
Update your Starton API key
/update-api-key
Permission required: Bot Administrator
Parameter | Type | Description |
---|---|---|
new-starton-api-key | String | [Required] New Starton API key (sk_live_... ) |
Regenerate your signing key
/regenerate-signing-key
Permission required : Bot Administrator
Parameter | Type | Description |
---|---|---|
/ | / | / |
Connect your wallet to the Starton Bot
/connect-wallet
Parameter | Type | Description |
---|---|---|
/ | / | / |
SMART-CONTRACT
Import your smart contract
/smart-contract import
Permission required : Bot Administrator
Parameter | Type | Description |
---|---|---|
network | String | [Required] Network on which the smart contract is deployed (ethereum-mainnet , ethereum-sepolia , avalance-mainnet , avalance-fuji , polygon-mainnet , polygon-amoy , binance-mainnet , binance-testnet ) |
contract-type | String | [Required] Type of the smart contract (ERC20 , ERC721 , ERC1155 ) |
contract-name | String | [Required] Name of the smart contract |
contract-address | String | [Required] Address of the smart contract (0x... ) |
Delete an imported smart contract
/smart-contract delete
Permission required : Bot Administrator
Parameter | Type | Description |
---|---|---|
smart-contract-id | String | [Required] ID of the smart contract you want to delete |
List imported smart contracts
/smart-contract list
Permission required : Bot Administrator
Parameter | Type | Description |
---|---|---|
/ | / | / |
TRIGGER
Create trigger on a registered smart contract
/trigger create
Permission required : Bot Administrator
Parameter | Type | Description |
---|---|---|
smart-contract-id | String | [Required] ID of the smart contract you want to link the trigger to |
role | Role | [Required] Role you want to be given |
min-amount | Number | [Optional] Minimum amount of token required. (Default 1) |
max-amount | Number | [Optional] Maximum amount of token required. (Default none) |
token-id | String | [Optional] Token ID (for ERC-1155) |
Delete a registered trigger
/trigger delete
Permission required : Bot Administrator
Parameter | Type | Description |
---|---|---|
trigger-id | String | [Required] ID of the trigger you want to delete |
List registered triggers
/trigger list
Permission required : Bot Administrator
Parameter | Type | Description |
---|---|---|
smart-contract-id | String | [Required] ID of the smart contract you want to see the triggers |
Airdrop tokens to reward your Discord community
You can reward your communities by airdroping token to Discord users. You can also organizer events on your server.
AIRDROP
Create an airdrop
The create command
allows you to create an airdrop. You need to associate it with a channel (mandatory), a signer wallet (mandatory), and a smart contract ID (mandatory). The token metadata field is mandatory for 721 tokens, and the token ID field is mandatory for 1155 tokens. You can also associate a password, a winning percentage, an amount during the airdrop, and a trial interval in seconds (-1 for a one-time participation). Only one airdrop is allowed per channel. The server must be configured to create an airdrop.
/airdrop create
Permission required : Bot Administrator
Parameter | Type | Description |
---|---|---|
airdrop-name | String | [Required] Name of the airdrop |
contract-id | String | [Required] ID of the smart contract you want to link to this airdrop |
signer-wallet | String | [Required] Address of the signer wallet of your smart contract |
airdrop-channel | Channel | [Required] Channel in which the user must be to claim the tokens |
Delete an airdrop
The delete command
allows you to delete an airdrop using its ID in the database (retrievable via the /airdrop list command).
/airdrop delete
Permission required : Bot Administrator
Parameter | Type | Description |
---|---|---|
airdrop-id | String | [Required] ID of the airdrop you want to delete |
List your airdrops
The list command
allows you to list all the airdrops configured on the server.
/airdrop list
Permission required : Bot Administrator
Parameter | Type | Description |
---|---|---|
/ | / | / |
Claim an airdrop
The claim command
allows all users to claim an airdrop in the appropriate channel. The user must have connected their wallet to claim.
/claim
Parameter | Type | Description |
---|---|---|
/ | / | / |