Skip to main content

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

To use this bot:

  • Create an account on Starton to get an API key
  • Create an account on Discord

Connecting your discord server

  1. Go to Starton Discord Studio.
  2. Click Connect your server.

Installing the bot

  1. 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

  2. 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

  1. 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

ParameterTypeDescription
starton-api-keyString[Required] Starton API key (sk_live_...)
administrator-roleRole[Required] Role that can manage the Starton bot
logging-channelChannel[Required] Channel used for the logs
Update your Starton API key
  /update-api-key

Permission required: Bot Administrator

ParameterTypeDescription
new-starton-api-keyString[Required] New Starton API key (sk_live_...)
Regenerate your signing key
  /regenerate-signing-key

Permission required : Bot Administrator

ParameterTypeDescription
///
Connect your wallet to the Starton Bot
  /connect-wallet
ParameterTypeDescription
///

SMART-CONTRACT

Import your smart contract
  /smart-contract import

Permission required : Bot Administrator

ParameterTypeDescription
networkString[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-typeString[Required] Type of the smart contract (ERC20, ERC721, ERC1155)
contract-nameString[Required] Name of the smart contract
contract-addressString[Required] Address of the smart contract (0x...)
Delete an imported smart contract
  /smart-contract delete

Permission required : Bot Administrator

ParameterTypeDescription
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

ParameterTypeDescription
///

TRIGGER

Create trigger on a registered smart contract
  /trigger create

Permission required : Bot Administrator

ParameterTypeDescription
smart-contract-idString[Required] ID of the smart contract you want to link the trigger to
roleRole[Required] Role you want to be given
min-amountNumber[Optional] Minimum amount of token required. (Default 1)
max-amountNumber[Optional] Maximum amount of token required. (Default none)
token-idString[Optional] Token ID (for ERC-1155)
Delete a registered trigger
  /trigger delete

Permission required : Bot Administrator

ParameterTypeDescription
trigger-idString[Required] ID of the trigger you want to delete
List registered triggers
  /trigger list

Permission required : Bot Administrator

ParameterTypeDescription
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

ParameterTypeDescription
airdrop-nameString[Required] Name of the airdrop
contract-idString[Required] ID of the smart contract you want to link to this airdrop
signer-walletString[Required] Address of the signer wallet of your smart contract
airdrop-channelChannel[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

ParameterTypeDescription
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

ParameterTypeDescription
///

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
ParameterTypeDescription
///
  • Connecting your discord server
  • Installing the bot
  • Verifying roles
  • Airdrop tokens to reward your Discord community