@pipelab/asset-discord 1.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ export default defineEventHandler((event) => {
2
+ return "Start by editing <code>server/routes/index.ts</code>.";
3
+ });
@@ -0,0 +1,8 @@
1
+ export default eventHandler((event) => {
2
+ setResponseHeader(event, "X-Frame-Options", "");
3
+ setResponseHeader(
4
+ event,
5
+ "Content-Security-Policy",
6
+ "frame-ancestors 'self' https://*.discordsays.com",
7
+ );
8
+ });
@@ -0,0 +1,34 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Document</title>
7
+ <style>
8
+ html,
9
+ body {
10
+ margin: 0;
11
+ padding: 0;
12
+ height: 100%;
13
+ overflow: hidden;
14
+ }
15
+ </style>
16
+
17
+ <script type="module">
18
+ import { DiscordSDK } from "https://unpkg.com/@discord/embedded-app-sdk@2.0.0/output/index.mjs";
19
+ const discordSdk = new DiscordSDK("1357217738241736724");
20
+
21
+ // Bootstrapping the SDK
22
+ await discordSdk.ready();
23
+ const { user } = await discordSdk.commands.authorize({
24
+ client_id: "1357217738241736724",
25
+ scopes: ["identify"],
26
+ });
27
+ console.log("Logged in user:", user);
28
+ </script>
29
+ </head>
30
+
31
+ <body>
32
+ <iframe src="./.proxy/index.html" frameborder="0" width="100%" height="100%"></iframe>
33
+ </body>
34
+ </html>
@@ -0,0 +1,4 @@
1
+ // https://nitro.unjs.io/guide/typescript
2
+ {
3
+ "extends": "./.nitro/types/tsconfig.json"
4
+ }