@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.
- package/LICENSE +110 -0
- package/package.json +18 -0
- package/template/netlify.toml +3 -0
- package/template/nitro.config.ts +9 -0
- package/template/package.json +15 -0
- package/template/pnpm-lock.yaml +3311 -0
- package/template/server/api/index.ts +3 -0
- package/template/server/middleware/security-header.ts +8 -0
- package/template/server/public/index.html +34 -0
- package/template/tsconfig.json +4 -0
|
@@ -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>
|