This commit is contained in:
Clove 2026-06-18 23:13:33 +01:00
parent 0499e9da17
commit bc6e91626f
1 changed files with 52 additions and 41 deletions

View File

@ -7,30 +7,41 @@
"compatibility_date": "2024-09-23",
"account_id": "f87ee4b9600f437b8da1104d077418c3",
// nodejs_compat is not required; we only use Web/Workers APIs.
"observability": { "enabled": true },
"observability": {
"enabled": true
},
// ---- Durable Object: single instance holds the Discord gateway socket ----
"durable_objects": {
"bindings": [
{ "name": "GATEWAY", "class_name": "GatewayManager" }
{
"name": "GATEWAY",
"class_name": "GatewayManager"
}
]
},
"migrations": [
{ "tag": "v1", "new_classes": ["GatewayManager"] }
{
"tag": "v1",
"new_sqlite_classes": [
"GatewayManager"
]
}
],
// ---- KV: cache for profile/badge data (not available over the gateway) ----
// Create with: wrangler kv namespace create PROFILE_CACHE
// then paste the returned id below.
"kv_namespaces": [
{ "binding": "PROFILE_CACHE", "id": "REPLACE_WITH_KV_ID" }
{
"binding": "PROFILE_CACHE",
"id": "0ad7fefa9239482a9028c820e4a0cec1"
}
],
// ---- Cron: nudge the Durable Object so the gateway stays connected ----
"triggers": {
"crons": ["*/2 * * * *"]
"crons": [
"*/2 * * * *"
]
},
// Non-secret vars. Secrets (tokens) are set via `wrangler secret put`.
"vars": {
"DISCORD_API_VERSION": "10",