diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md
index 84c05ce..563683e 100644
--- a/.github/copilot-instructions.md
+++ b/.github/copilot-instructions.md
@@ -3,6 +3,7 @@ You are an advanced assistant specialized in generating Cloudflare Workers code.
+
- Respond in a friendly and concise manner
- Focus exclusively on Cloudflare Workers solutions
- Provide complete, self-contained solutions
@@ -12,6 +13,7 @@ You are an advanced assistant specialized in generating Cloudflare Workers code.
+
- Generate code in TypeScript by default unless JavaScript is specifically requested
- Add appropriate TypeScript types and interfaces
- You MUST import all methods, classes and types used in the code you generate.
@@ -28,6 +30,7 @@ You are an advanced assistant specialized in generating Cloudflare Workers code.
+
- Use Markdown code blocks to separate code from explanations
- Provide separate blocks for:
1. Main worker code (index.ts/index.js)
@@ -40,6 +43,7 @@ You are an advanced assistant specialized in generating Cloudflare Workers code.
+
- When data storage is needed, integrate with appropriate Cloudflare services:
- Workers KV for key-value storage, including configuration data, user profiles, and A/B testing
- Durable Objects for strongly consistent state management, storage, multiplayer co-ordination, and agent use-cases
@@ -58,6 +62,7 @@ You are an advanced assistant specialized in generating Cloudflare Workers code.
+
- Always provide a wrangler.jsonc (not wrangler.toml)
- Include:
- Appropriate triggers (http, scheduled, queues)
@@ -97,6 +102,7 @@ You are an advanced assistant specialized in generating Cloudflare Workers code.
+
- Implement proper request validation
- Use appropriate security headers
- Handle CORS correctly when needed
@@ -107,6 +113,7 @@ You are an advanced assistant specialized in generating Cloudflare Workers code.
+
- Include basic test examples
- Provide curl commands for API endpoints
- Add example environment variable values
@@ -115,6 +122,7 @@ You are an advanced assistant specialized in generating Cloudflare Workers code.
+
- Optimize for cold starts
- Minimize unnecessary computation
- Use appropriate caching strategies
@@ -124,6 +132,7 @@ You are an advanced assistant specialized in generating Cloudflare Workers code.
+
- Implement proper error boundaries
- Return appropriate HTTP status codes
- Provide meaningful error messages
@@ -133,6 +142,7 @@ You are an advanced assistant specialized in generating Cloudflare Workers code.
+
- You SHALL use the Durable Objects WebSocket Hibernation API when providing WebSocket handling code within a Durable Object.
- Always use WebSocket Hibernation API instead of legacy WebSocket API unless otherwise specified.
- Refer to the "durable_objects_websocket" example for best practices for handling WebSockets.
@@ -228,6 +238,7 @@ const [client, server] = Object.values(webSocketPair);
+
- Uses the WebSocket Hibernation API instead of the legacy WebSocket API
- Calls `this.ctx.acceptWebSocket(server)` to accept the WebSocket connection
- Has a `webSocketMessage()` handler that is invoked when a message is received from the client
@@ -293,6 +304,7 @@ this.storage.setAlarm(Date.now() + 10 \_ SECONDS);
+
- Uses the Durable Object Alarm API to trigger an alarm
- Has a `alarm()` handler that is invoked when the alarm is triggered
- Sets a new alarm for 10 seconds from now before exiting the handler
@@ -366,6 +378,7 @@ export default app
+
- Uses Hono as the router and middleware
- Uses Workers KV to store session data
- Uses the Authorization header or Cookie to get the token
@@ -440,6 +453,7 @@ const requests = batch.messages.map(msg => msg.body);
+
- Defines both a producer and consumer for the queue
- Uses a dead letter queue for failed messages
- Uses a retry delay of 300 seconds to delay the re-delivery of failed messages
@@ -516,6 +530,7 @@ npx wrangler hyperdrive create --connection-string="postgres:
+
- Installs and uses Postgres.js as the database client/driver.
- Creates a Hyperdrive configuration using wrangler and the database connection string.
- Uses the Hyperdrive connection string to connect to the database.
@@ -635,6 +650,7 @@ let url = new URL(req.url);
+
- Defines a Workflow by extending the WorkflowEntrypoint class.
- Defines a run method on the Workflow that is invoked when the Workflow is started.
- Ensures that `await` is used before calling `step.do` or `step.sleep`
@@ -714,6 +730,7 @@ curl "
+
- Binds an Analytics Engine dataset to the Worker
- Uses the `AnalyticsEngineDataset` type when using TypeScript for the binding
- Writes event data using the `writeDataPoint` method and writes an `AnalyticsEngineDataPoint`
@@ -779,6 +796,7 @@ let url = searchParams.get("url");
+
- Configures a BROWSER_RENDERING binding
- Passes the binding to Puppeteer
- Uses the Puppeteer APIs to navigate to a URL and render the page
@@ -825,6 +843,7 @@ const url = new URL(request.url);
}
+
- Configures a ASSETS binding
- Uses /public/ as the directory the build output goes to from the framework of choice
- The Worker will handle any requests that a path cannot be found for and serve as the API
@@ -1220,6 +1239,7 @@ apiKey: env.OPENAI_API_KEY,
}
+
- Defines a JSON Schema compatible object that represents the structured format requested from the model
- Sets `response_format` to `json_schema` and provides a schema to parse the response
- This could also be `json_object`, which can be parsed after the fact.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 11e072c..a2141d5 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -38,6 +38,7 @@ After you create your app, you'll land on the **General Information** page of th
In your code editor, duplicate `.example.dev.vars` and rename it to `.dev.vars` in the root of the project directory.
On your Discord app's settings, enter your app credentials in `.dev.vars`:
+
- On the **General Information** page, copy the value for **Application ID**. In `.dev.vars`, enter your pasted value in `DISCORD_APPLICATION_ID`

@@ -82,6 +83,7 @@ When **Discord Provided Link** is selected, a new **Default Install Settings** s
#### Scopes and Bot Permissions
On the **Installation** page in the **Default Install Settings** section:
+
- For **User Install**, add the `applications.commands` scope
- For **Guild Install**, add the `applications.commands` scope
diff --git a/PRIVACY_POLICY.md b/PRIVACY_POLICY.md
index 2036d74..def156c 100644
--- a/PRIVACY_POLICY.md
+++ b/PRIVACY_POLICY.md
@@ -13,6 +13,7 @@ This Privacy Policy explains how Disclip ("we," "our," or "the Service") collect
### 2.1 Discord Message Data
When you use Disclip to create message images, we temporarily process:
+
- Message content and metadata
- User display names and avatars
- Server information (when applicable)
@@ -21,6 +22,7 @@ When you use Disclip to create message images, we temporarily process:
### 2.2 Usage Information
We may collect:
+
- Discord user IDs for command interactions
- Server IDs where the bot is used
- Basic usage analytics and error logs
@@ -28,6 +30,7 @@ We may collect:
## 3. How We Use Information
We use the collected information to:
+
- Generate message screenshot images
- Provide and improve the Service
- Debug and fix technical issues
@@ -50,6 +53,7 @@ The Service runs on Cloudflare Workers, which may temporarily cache data accordi
## 5. Data Sharing
We do not sell, trade, or share your personal information with third parties, except:
+
- As required by law or legal process
- To protect our rights and the safety of users
- With service providers necessary for Service operation (e.g., Cloudflare)
@@ -65,6 +69,7 @@ We implement appropriate security measures to protect against unauthorized acces
## 8. User Rights
You have the right to:
+
- Stop using the Service at any time
- Remove the bot from your servers
- Contact us with privacy-related questions
@@ -88,5 +93,6 @@ If you have questions about this Privacy Policy, please contact us through our [
## 13. Third-Party Services
The Service integrates with:
+
- **Discord:** Subject to [Discord's Privacy Policy](https://discord.com/privacy)
- **Cloudflare Workers:** Subject to [Cloudflare's Privacy Policy](https://www.cloudflare.com/privacypolicy/)
diff --git a/README.md b/README.md
index 2e72ef0..cb119e6 100644
--- a/README.md
+++ b/README.md
@@ -26,6 +26,7 @@ Clipped messages will be sent in the same channel as the original message.
## Support Server
If you have any questions, suggestions, or need help with Disclip, feel free to join the support server on Discord.
+
- Share feedback or your experience
- Get technical support with Disclip
- Be the first to know about updates
diff --git a/TERMS_OF_SERVICE.md b/TERMS_OF_SERVICE.md
index 24b3b44..f1012b7 100644
--- a/TERMS_OF_SERVICE.md
+++ b/TERMS_OF_SERVICE.md
@@ -15,6 +15,7 @@ Disclip is a Discord application that allows users to create high-quality images
## 3. User Conduct
You agree to use the Service responsibly and in compliance with:
+
- Discord's Terms of Service and Community Guidelines
- All applicable laws and regulations
- These Terms of Service
@@ -22,6 +23,7 @@ You agree to use the Service responsibly and in compliance with:
### 3.1 Prohibited Uses
You may not use the Service to:
+
- Create images of messages without proper authorization from message authors
- Share or distribute content that violates Discord's Community Guidelines
- Attempt to reverse engineer, modify, or interfere with the Service
diff --git a/biome.json b/biome.json
index 19136f2..6d3441f 100644
--- a/biome.json
+++ b/biome.json
@@ -1,5 +1,5 @@
{
- "$schema": "https://biomejs.dev/schemas/2.6.4/schema.json",
+ "$schema": "https://biomejs.dev/schemas/2.6.7/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
diff --git a/package-lock.json b/package-lock.json
index a9ff542..1ab719b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -14,7 +14,7 @@
"itty-router": "^5.0.24"
},
"devDependencies": {
- "@biomejs/biome": "2.6.4",
+ "@biomejs/biome": "2.6.7",
"wrangler": "^4.144.0"
},
"funding": {
@@ -23,9 +23,9 @@
}
},
"node_modules/@biomejs/biome": {
- "version": "2.6.4",
- "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.6.4.tgz",
- "integrity": "sha512-8sKKwaNW4ot22awZ3lBjwWLHnUFXgXnrBPYS2gNlBAXRbDC++7kqjK2H7dR/FgCDtPvO1xfKpgEhJkGxAKYkxA==",
+ "version": "2.6.7",
+ "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.6.7.tgz",
+ "integrity": "sha512-2bT1FE6FvZZgPLFw4BjcDyRwG8Ry9zYla4X+Lw8oj2SxvqiXHiYkkEpjcrsWQrik6iYHygAa/D67YxLbVz9P1Q==",
"dev": true,
"license": "MIT OR Apache-2.0",
"bin": {
@@ -39,22 +39,22 @@
"url": "https://opencollective.com/biome"
},
"optionalDependencies": {
- "@biomejs/cli-android-arm64": "2.6.4",
- "@biomejs/cli-android-x64": "2.6.4",
- "@biomejs/cli-darwin-arm64": "2.6.4",
- "@biomejs/cli-darwin-x64": "2.6.4",
- "@biomejs/cli-linux-arm64": "2.6.4",
- "@biomejs/cli-linux-arm64-musl": "2.6.4",
- "@biomejs/cli-linux-x64": "2.6.4",
- "@biomejs/cli-linux-x64-musl": "2.6.4",
- "@biomejs/cli-win32-arm64": "2.6.4",
- "@biomejs/cli-win32-x64": "2.6.4"
+ "@biomejs/cli-android-arm64": "2.6.7",
+ "@biomejs/cli-android-x64": "2.6.7",
+ "@biomejs/cli-darwin-arm64": "2.6.7",
+ "@biomejs/cli-darwin-x64": "2.6.7",
+ "@biomejs/cli-linux-arm64": "2.6.7",
+ "@biomejs/cli-linux-arm64-musl": "2.6.7",
+ "@biomejs/cli-linux-x64": "2.6.7",
+ "@biomejs/cli-linux-x64-musl": "2.6.7",
+ "@biomejs/cli-win32-arm64": "2.6.7",
+ "@biomejs/cli-win32-x64": "2.6.7"
}
},
"node_modules/@biomejs/cli-android-arm64": {
- "version": "2.6.4",
- "resolved": "https://registry.npmjs.org/@biomejs/cli-android-arm64/-/cli-android-arm64-2.6.4.tgz",
- "integrity": "sha512-jwrwigP4tBcHxzuV8izioX/BOUhJL/4e2rNSOE5nCjBkVC018LQAQUGiH+CNkFYvLtQ1dcZo5/xXERmaAGc7JQ==",
+ "version": "2.6.7",
+ "resolved": "https://registry.npmjs.org/@biomejs/cli-android-arm64/-/cli-android-arm64-2.6.7.tgz",
+ "integrity": "sha512-f4fyRTl+rW6QZp+iHdZrKAKptG/xmIDijTnxWhpC1Hnzr8yvjaBm/aJ98JiMv5mMx7jL1MOu4+zwmQUzfcoKBg==",
"cpu": [
"arm64"
],
@@ -69,9 +69,9 @@
}
},
"node_modules/@biomejs/cli-android-x64": {
- "version": "2.6.4",
- "resolved": "https://registry.npmjs.org/@biomejs/cli-android-x64/-/cli-android-x64-2.6.4.tgz",
- "integrity": "sha512-HdGInPJ4nZFwHxzvEtcp2nmSBtUyJrurmtIK43upFckuS3+ZqVM05HtsxQWnqGsuy/pxckIAjyKWlEKRlBXUyA==",
+ "version": "2.6.7",
+ "resolved": "https://registry.npmjs.org/@biomejs/cli-android-x64/-/cli-android-x64-2.6.7.tgz",
+ "integrity": "sha512-eUdeN+mh2bwen+By1feKzpFkFGAfLG3Pxi6tbwpzMvePBwFGMd4mnE6gaxDRMiWJ1eMuc+Xhtg3ErbLLbtL5wQ==",
"cpu": [
"x64"
],
@@ -86,9 +86,9 @@
}
},
"node_modules/@biomejs/cli-darwin-arm64": {
- "version": "2.6.4",
- "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.6.4.tgz",
- "integrity": "sha512-0VvcUz46wbg59Q4TZ59KkIjDJrxEyu4Eoe79+F4SChxoWe+W7AEyIp6F5r72C9+p6MsB6dIovnZt1D30lGM3XA==",
+ "version": "2.6.7",
+ "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.6.7.tgz",
+ "integrity": "sha512-GewLcsnCsVblgnWYw5QRz5ydy9xphCtlFP37TpLKarezqwZMrH2qxrYblhY6DPOir4gnKyaqDnS/xZWIGVjaKw==",
"cpu": [
"arm64"
],
@@ -103,9 +103,9 @@
}
},
"node_modules/@biomejs/cli-darwin-x64": {
- "version": "2.6.4",
- "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.6.4.tgz",
- "integrity": "sha512-fxmvkF81srlS3DiMyfm+aG3J0eG+6/BjaxRyjy57KbLSafnq0PO+hHfVWmtH2ty0S7nm6yDXBRwySfFeaRJKRQ==",
+ "version": "2.6.7",
+ "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.6.7.tgz",
+ "integrity": "sha512-AMPl+Q+bHjRcNUBn8gwBl+dJAnKRUWGZ7ZiJo2U8tQtdpqJ32OqvIg4cwTH+xv0jrcNVkUSE69nj57zsHZ1WBA==",
"cpu": [
"x64"
],
@@ -120,9 +120,9 @@
}
},
"node_modules/@biomejs/cli-linux-arm64": {
- "version": "2.6.4",
- "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.6.4.tgz",
- "integrity": "sha512-6+bK1Y/evmIUiJr7auertuMbiaYVicJhqA1bZyL47lCMWugv8l0gFQCqvR/gN1vZMHYm+HwoTKgeMxdNFCoQTg==",
+ "version": "2.6.7",
+ "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.6.7.tgz",
+ "integrity": "sha512-Qa2edxQClKn17y1ASWkOOuT96K2si1nTLiPbXMOMilNJ79eNsa1as1kaSbgxOXy1kRUENw76sp4pAddneq3l8Q==",
"cpu": [
"arm64"
],
@@ -140,9 +140,9 @@
}
},
"node_modules/@biomejs/cli-linux-arm64-musl": {
- "version": "2.6.4",
- "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.6.4.tgz",
- "integrity": "sha512-31ZaH/MHqPX+O+evRwRrCHQ8W5/9adY+/eMytGGWZnRx1T41QsWIF09+/WujynLBhWZUxNGS5CtsWLwgOFTAyg==",
+ "version": "2.6.7",
+ "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.6.7.tgz",
+ "integrity": "sha512-BIA7qVO1O15D2wVKxLTcvEWszgOqJVZRUhlksg1KQ9N0VtYCbvknV1vyjFiSrzuBT57+z59gbzhYQCinw9lRSQ==",
"cpu": [
"arm64"
],
@@ -160,9 +160,9 @@
}
},
"node_modules/@biomejs/cli-linux-x64": {
- "version": "2.6.4",
- "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.6.4.tgz",
- "integrity": "sha512-tbFZMdL6dP/ws4edXxYG9WhvaVa1ZDzL4G5DzahnWW7Psib9H+VTdyU4XXVxpJk5j/nYZroSbvSNyYlpW3yCIw==",
+ "version": "2.6.7",
+ "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.6.7.tgz",
+ "integrity": "sha512-VpHQ33CPNYrlIn0vyDdRS1KUlS3AiM17FiyEE2gwU000NwzyY4MgjzVHEv2KrmMb5D9Ksm3gFkwg+IOx/ULJNQ==",
"cpu": [
"x64"
],
@@ -180,9 +180,9 @@
}
},
"node_modules/@biomejs/cli-linux-x64-musl": {
- "version": "2.6.4",
- "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.6.4.tgz",
- "integrity": "sha512-bomSa2XdQAGGj6Cwdm4M13qE+lN9+AOlW8KtI4hdyVyRRF/Z71qPAi95T4wtdZK0QpBbkTW8hgbZZCwPi4xzIw==",
+ "version": "2.6.7",
+ "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.6.7.tgz",
+ "integrity": "sha512-+AOQyCsPR4nH5L4Hjzp8T0iaHm4UxY3unjL/KUJKc/8ziLnbkbmL3adtWmQW5ERB1zi6LRA1fsjaSuf/xGnLaQ==",
"cpu": [
"x64"
],
@@ -200,9 +200,9 @@
}
},
"node_modules/@biomejs/cli-win32-arm64": {
- "version": "2.6.4",
- "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.6.4.tgz",
- "integrity": "sha512-eCsqt8Ma3eVap+oyJCDnJZH60SIU464B66n3y38EUTJdM1T/HfZol1FJC9vb+sHToX0ix8XzqPcwJnOzyAJz0g==",
+ "version": "2.6.7",
+ "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.6.7.tgz",
+ "integrity": "sha512-2nLivZfgcGMIXP/bI8w1FZP5JE2MetP+XZInyMQ7SvJBKlDoGrm/nRjN7uUi9dOaaSlpbRWkHSfb7PqcQR3nXg==",
"cpu": [
"arm64"
],
@@ -217,9 +217,9 @@
}
},
"node_modules/@biomejs/cli-win32-x64": {
- "version": "2.6.4",
- "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.6.4.tgz",
- "integrity": "sha512-pYsMy5AThiHFOZAsngg8qN4PurM6nInKBhVX7sbj3eNpRQqo1Hb0MgCwPL7VqVMrmcEEMj9Ks3qbkallR65e8g==",
+ "version": "2.6.7",
+ "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.6.7.tgz",
+ "integrity": "sha512-uYfH+n+IAtVz3lh7m6JxdjxfJ3WCvAJDE3spHIUbU955V42oKymlhiQiu92fAhXZb7KOjvRcrfImySQbc1MFFg==",
"cpu": [
"x64"
],
diff --git a/package.json b/package.json
index b74ae17..cba3a45 100644
--- a/package.json
+++ b/package.json
@@ -40,7 +40,7 @@
"itty-router": "^5.0.24"
},
"devDependencies": {
- "@biomejs/biome": "2.6.4",
+ "@biomejs/biome": "2.6.7",
"wrangler": "^4.144.0"
}
}