ceejay.community
Look up which community a key belongs to, what the key can do, and which features this instance supports.
The function takes the same last argument as every other, options: signal, timeoutMs
and maxRetries, for that one call. It can also raise the errors any request can raise,
such as a bad key or the rate limit. Both are on
Errors and retries.
ceejay.community.get
Gets the community of the key, the key's permissions and rate limit, and which features this community can use. Make it your first call: it tells you immediately whether the key works, and what to expect from every other function.
GET /v1/community · any valid key · API reference: Community details
Retried by the SDK: Yes. It is a read
Takes options only.
Returns Schemas['Community'].
Prop
Type
features has eleven entries. Each has available, and two have one more field:
| Entry | The functions it is about | One more field |
|---|---|---|
xp | xp.getBalance, xp.grant, xp.deduct | |
economy | The three under economy | enabled: whether the community's economy is switched on. While it is off, quests.complete does not grant a quest's coins. economy.grant and economy.deduct work either way |
quests | The three under quests | dailyQuestLimit: how many quests a member can complete in one day, which quests.complete applies |
programs | programs.list, xp.program.grant, xp.program.deduct | |
linking | members.link | |
roles | The three under roles | |
messages | channels.list, messages.send | |
events | events.emit | |
shopDelivery | The two under shop | |
retryKeys | idempotencyKey on every write | |
players | The five under connect, and what CeejayConnect sends from a game. Connect is enabled per instance, so this also reads false where it is not enabled |
What a function returns while its entry reads available: false is described under
A feature this instance does not support yet.
Errors
This request has no errors of its own and needs no permission, so it cannot return
insufficient_scope.
Example
const community = await ceejay.community.get()
console.log(`${community.name} (${community.serverId}), API ${community.apiVersion}`)
console.log(`This key: ${community.key.scopes.join(', ')}, ${community.key.rateLimitPerMinute} requests a minute`)
if (!community.features.retryKeys.available) {
console.log('This instance does not support idempotency keys yet')
}
if (community.features.economy.available && !community.features.economy.enabled) {
console.log('The economy is switched off: a quest pays no coins')
}
for (const platform of community.platforms.custom) {
console.log(platform.slug, platform.name)
}A feature this instance does not support yet
An instance is updated in stages, so for a short time after an update a community can lack
what a function needs. features reports this before you call.
Entry that reads available: false | What its functions return |
|---|---|
economy, quests, programs, linking, events, shopDelivery, players | Status 404 with the code not_available. error.body.feature names the entry |
roles, messages | Status 500 with the code discord_not_configured |
retryKeys | A write sent with idempotencyKey is rejected with status 503 and the code idempotency_unavailable. The same write without a key works |
A call rejected this way changes nothing, and waiting does not change the response: contact support to complete the update.

