Discord User Integration

1. Claiming Discord-Based Missions

In the missions list or Get mission API, we send a flag to ensure the user has the account connected to go ahead with the flow. Use this flag to handle accordingly.

{
  "is_prerequisite_met" : false 
}

If the flag is false, connect users discord account as the first step to process the missions. Use https://loyaltydocs.getmojito.com/reference/discord-connect#/ to connect discord account.

1.1. Connect Discord Mission

Notes: For Code Snippet and Example, reference the Recipes here.


2. Redeeming Discord Rewards

  • In the rewards list or Get reward API, we send a flag to ensure the user has the account connected to go ahead with the flow. Use this flag to handle accordingly
{
  "is_prerequisite_met" : false 
}

2.1. Redeem Server Invite Reward

  • Provides an invite link to a Discord server similar to missions.
  • User gets the unique server invite link as part of redeem API response and Redeem Status API
  • In few cases, the redeem API returns the response once the redeem gets triggered and user would get the invite link in status API. It is advisable to rely on status API.
  • {
    "custom_reward":{
      "discord_invite_link":"https://discord.gg/sYh8JQYQWC"
    	}
    }
  • Users can click the link and join to claim the reward.
  • Once joined, the system verifies their presence and completes the reward.
  • Redeem debit the associated points from the user balance.

2.2. Redeem a Role Reward

  • Users can redeem role assign rewards using the redeem API.
  • The bot assigns the selected role to the user.
  • The system triggers the bot to grant the role once the user redeems the reward.
  • Redeem debit the associated points from the user balance.

Notes: For Code Snippet and Example, reference the Recipes here..


What’s Next

For specific code snippet and example, verify the Recipes section..