Daily Rewards
Configuration
{
"dailyRewards": {
"rewards": ["100_coins", "200_coins", "1_gem", "300_coins", "2_gems", "500_coins", "5_gems"],
"cycle": true, // optional, default true — restart from day 1 after the last reward
"resetOnMiss": true // optional, default true — reset the streak when a day is missed
}
}Get Rewards
const rewards = await bridge.dailyRewards.getRewards() // string[]Bridge.dailyRewards.GetRewards((success, rewards) =>
{
if (success)
{
// rewards is an ordered string[] of reward ids
}
});Bridge.daily_rewards.get_rewards(funcref(self, "_on_get_rewards_completed"))
func _on_get_rewards_completed(success, rewards):
if success:
for reward in rewards:
print(reward)Bridge.daily_rewards.get_rewards(Callable(self, "_on_get_rewards_completed"))
func _on_get_rewards_completed(success, rewards):
if success:
for reward in rewards:
print(reward)Get Current Day
Get Current Reward
Claim Current Reward
Last updated