mirror of
https://github.com/ReCloudStudio/WebHooker.git
synced 2026-09-22 16:11:29 +00:00
feat(discord): make gateway optional with REST send path and send logs
Gateway is now an opt-in feature (DISCORD_GATEWAY_ENABLED); when disabled, messages are delivered via the Discord REST API (discord-rest.ts) instead of the Durable Object. Record per-route delivery results (send-log.ts) for the WebUI. Configure assets binding, DO sqlite migration and cron trigger.
This commit is contained in:
parent
4d5c90773d
commit
cfdf37e273
4 changed files with 184 additions and 56 deletions
|
|
@ -1,26 +1,42 @@
|
|||
{
|
||||
"name": "webhooker",
|
||||
"main": "src/index.ts",
|
||||
"compatibility_date": "2025-01-01",
|
||||
"compatibility_flags": ["nodejs_compat"],
|
||||
"durable_objects": {
|
||||
"bindings": [
|
||||
{
|
||||
"name": "DISCORD_GATEWAY",
|
||||
"class_name": "DiscordGateway",
|
||||
},
|
||||
],
|
||||
},
|
||||
"migrations": [
|
||||
{
|
||||
"tag": "v1",
|
||||
"new_classes": ["DiscordGateway"],
|
||||
},
|
||||
],
|
||||
"kv_namespaces": [
|
||||
{
|
||||
"binding": "KV",
|
||||
"id": "placeholder-will-be-replaced",
|
||||
},
|
||||
],
|
||||
"name": "webhooker",
|
||||
"main": "src/index.ts",
|
||||
"compatibility_date": "2025-01-01",
|
||||
"compatibility_flags": [],
|
||||
"vars": {
|
||||
"DISCORD_GATEWAY_ENABLED": "true"
|
||||
},
|
||||
"assets": {
|
||||
"directory": "./admin/dist",
|
||||
"binding": "ASSETS",
|
||||
"run_worker_first": true,
|
||||
"not_found_handling": "single-page-application"
|
||||
},
|
||||
"triggers": {
|
||||
"crons": [
|
||||
"*/5 * * * *"
|
||||
]
|
||||
},
|
||||
"durable_objects": {
|
||||
"bindings": [
|
||||
{
|
||||
"name": "DISCORD_GATEWAY",
|
||||
"class_name": "DiscordGateway",
|
||||
},
|
||||
],
|
||||
},
|
||||
"migrations": [
|
||||
{
|
||||
"tag": "v1",
|
||||
"new_sqlite_classes": [
|
||||
"DiscordGateway"
|
||||
],
|
||||
},
|
||||
],
|
||||
"kv_namespaces": [
|
||||
{
|
||||
"binding": "KV",
|
||||
"id": "53abb6d985a44b80b2b08d510f73928a"
|
||||
},
|
||||
],
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue