CEEJAYDocs

Game rewards

What a connection and a game event can earn a member, when CEEJAY grants it, how duplicate rewards are prevented, and what your game reads about it.

A community can attach rewards to a game. One list is granted when a player connects. Another list belongs to each event the community approved in the game's field map, and is granted when that event happens. The rewards are the ones the community can offer anywhere in CEEJAY: coins, XP, a role, a badge, an item. The community's team chooses them, and CEEJAY's bot grants them.

Your game or your server never grants a reward and never requests one. It reports what happened: the member connected, through Connect, and the player did something, through Log player events. This page is for the studio's developers. It says when a reward is granted, how duplicate rewards are prevented, and what to read back.

When a connection is rewarded

Shortly after the member authorises the connection, CEEJAY's bot processes it. It adds the entries to the member history and sends player.connected. Then, only when all of these conditions are met, it assigns the connection role, releases rewards held until the account is linked, and grants the reward list for connecting:

  • The connection meets the verification level the game requires. A game rewards verified connections only, unless it is set up to reward a basic one. A connection where the game supplied the player ID without verification earns nothing under the default, and the result is needs_verified_proof.
  • The player's Discord account is in the server. A reward is not granted for joining, so a player whose account is not in the server is not rewarded later either: the result is not_member.
  • The member passed Discord's membership screening. Until then the result is waiting_screening, and CEEJAY checks again every 15 minutes for 7 days.
  • The game is active. A removed or suspended game grants nothing. A paused game completes what was already queued.

The same applies to a player your own server linked with Link an account under the game's slug. The community's general reward for linking an account is not granted for a game: the game's own list is used instead.

When an event is rewarded

Log player events returns reward: "queued" for an event that has a reward list. The call does not wait: the bot grants the reward shortly afterwards. A reward is queued only when:

  • the event is less than 24 hours old (an older one is logged and grants nothing);
  • the connection meets the verification level the game requires;
  • the player's Discord account is in the server.

The event decides how often it is rewarded:

Reward modeIt grants
onceOne time for each member, ever
eachFor each different eventId, up to a number of times a day that the community sets for the event

A connection that was moved to another player grants nothing for the old player's play.

Preventing duplicate rewards

  • Once for each member and game for the reward for connecting. A member who was rewarded gets already_paid however many times they connect.
  • Once for each player as well, at the verified level. If a second Discord account takes over a verified player, it is not rewarded again for the same player.
  • At the basic level only the member rule applies. A false claim on an ID cannot use up the reward of the real owner: when the owner verifies the player later, the reward is still available.
  • Two accounts at the same moment cannot both be rewarded for one verified player: one is rewarded and the other gets already_paid.
  • A retry never grants a reward twice. The grant has a key made from the game, the reward and, for an event, the eventId.

What your game reads

The result of a connection has a reward with a status and items: see Get the result, Confirm connect and Get the player's profile.

statusWhat it means
pendingThe bot has not finished processing this connection. Poll again in a few seconds
paidThe reward was granted to the member. items lists what it was
noneNothing was granted and nothing will be: the game has no reward for connecting, or it ended without a reward
already_paidThis member or this player was rewarded before
needs_verified_proofThe game rewards only verified connections, and this one was not
not_memberThe player's Discord account is not in the server
waiting_screeningThe member has not passed Discord's membership screening yet

An event reward has no field of its own in the response of a request: reward in Log player events is queued or none. A reward the member still has to claim is granted but not listed in items.

No messages to the member

CEEJAY never sends a member a direct message about a game reward. This applies to a reward grant, a reminder, and a reward the community's team cancels or refunds afterwards.

Quests are another way

A community can also give a game a quest with a task of the type "Completed by your API". A key with quests:complete reports that a player did something, and the quest grants rewards through its steps, sprints and repeats. Use it when you want steps or a time window. Use an event reward for the plain case: an event happened, grant once. See Complete a quest task.

On this page

Community StudiosPrivacyTerms