sdfksdjfk

This commit is contained in:
cirroskais 2024-03-18 16:42:36 -04:00
parent 68ce171d8b
commit a2fc1a3957
No known key found for this signature in database
GPG key ID: 5FC73EBF2678E33D

View file

@ -4,18 +4,16 @@
let logs = [{ type: "Init", content: "Begin logs" }]; let logs = [{ type: "Init", content: "Begin logs" }];
async function main() { async function main() {
const auth = await authorize().catch((e) => e); const auth = await authorize();
if (!auth) return (logs = [...logs, { type: "Auth", content: `Failure | ${JSON.stringify(auth)}` }]); logs = [...logs, { type: "Auth", content: JSON.stringify(auth.user, null, 4) }];
logs = [...logs, { type: "Auth", content: JSON.stringify(auth.user) }];
const response = await discordSdk.commands.setActivity({ const activity = await discordSdk.commands.setActivity({
activity: { activity: {
type: 3, type: 3,
details: "garf", details: "garf",
state: "garfing rn", state: "garfing rn",
timestamps: { timestamps: {
start: Date.now(), start: Date.now(),
end: 0,
}, },
party: { party: {
size: [4, 5], size: [4, 5],
@ -29,7 +27,7 @@
}, },
}); });
logs = [...logs, { type: "Activity", content: JSON.stringify(response) }]; logs = [...logs, { type: "Activity", content: JSON.stringify(activity, null, 4) }];
} }
main(); main();
@ -38,7 +36,7 @@
<main> <main>
<p>garf 2: eletric boogaloo</p> <p>garf 2: eletric boogaloo</p>
{#each logs as log} {#each logs as log}
<h6>{log.type}</h6> <p><strong>{log.type}</strong></p>
<tt>{log.content}</tt> <tt>{log.content}</tt>
<br /> <br />
{/each} {/each}