Eternal
Eternal
Explore posts from servers
TTCTheo's Typesafe Cult
Created by Eternal on 8/25/2024 in #questions
Should the server respond with the error or a generic "try again" message?
Ooh. I'm gunna do that except with a webhook
10 replies
TTCTheo's Typesafe Cult
Created by Eternal on 8/25/2024 in #questions
Should the server respond with the error or a generic "try again" message?
Logging all errors to the database or to a file? I didn't think of that before. Great idea.
10 replies
NNuxt
Created by Eternal on 5/26/2024 in #❓・help
UI not changing when ref variable changes
<template>
<button @click="toggleRobloxAccounts" class="activeAccount">
<div class="wrapper">
<img :src="robloxAccount.profilePicture" :alt="robloxAccount.username" ref="robloxAccountImage">
<p ref="robloxAccountUsername">{{ robloxAccount.username }}</p>
</div>
<Icon name="fa-solid:chevron-down" />
</button>
<div v-show="showRobloxAccounts" class="reserveRobloxAccounts">
<button v-for="account in reserveRobloxAccounts" :key="account.robloxId"
@click="setActiveAccount(account.robloxId)">
<div class="wrapper">
<NuxtImg :src="account.profilePicture" :alt="account.username" format="avif"
draggable="false" />
<p>{{ account.username }}</p>
</div>
</button>
</div>
</template>
<template>
<button @click="toggleRobloxAccounts" class="activeAccount">
<div class="wrapper">
<img :src="robloxAccount.profilePicture" :alt="robloxAccount.username" ref="robloxAccountImage">
<p ref="robloxAccountUsername">{{ robloxAccount.username }}</p>
</div>
<Icon name="fa-solid:chevron-down" />
</button>
<div v-show="showRobloxAccounts" class="reserveRobloxAccounts">
<button v-for="account in reserveRobloxAccounts" :key="account.robloxId"
@click="setActiveAccount(account.robloxId)">
<div class="wrapper">
<NuxtImg :src="account.profilePicture" :alt="account.username" format="avif"
draggable="false" />
<p>{{ account.username }}</p>
</div>
</button>
</div>
</template>
The userDataStore is a Pinia store
3 replies
NNuxt
Created by Eternal on 5/26/2024 in #❓・help
UI not changing when ref variable changes
Here's my code if you want to take a look
<script>
const showRobloxAccounts = ref(false);
function toggleRobloxAccounts() {
showRobloxAccounts.value = !showRobloxAccounts.value;
}


const robloxAccount = ref<{ username: string, robloxId: number, profilePicture: string }>({
username: "",
robloxId: 0,
profilePicture: ""
});
const reserveRobloxAccounts = ref<username: string, robloxId: number, profilePicture: string[]>([]);

function setActiveAccount(robloxId: number) {
for (let i = 0; i < reserveRobloxAccounts.value.length; i++) {
if (reserveRobloxAccounts.value[i].robloxId == robloxId) {
const temp = reserveRobloxAccounts.value[i];
reserveRobloxAccounts.value.splice(i, 1);
console.log(robloxAccount.value)
reserveRobloxAccounts.value.push(robloxAccount.value);
robloxAccount.value = {
username: temp.username,
robloxId: temp.robloxId,
profilePicture: temp.profilePicture,
};
console.log(robloxAccount.value)
break;
}
}
}

watch(userDataStore, (data) => {
robloxAccount.value = data.robloxAccount;
reserveRobloxAccounts.value = data.reserveRobloxAccounts;
});

watch(robloxAccount, (data) => {
console.log("hello world"); //this doesnt run after you change the robloxAccount variable in the setActiveAccount function.
});
</script>
<script>
const showRobloxAccounts = ref(false);
function toggleRobloxAccounts() {
showRobloxAccounts.value = !showRobloxAccounts.value;
}


const robloxAccount = ref<{ username: string, robloxId: number, profilePicture: string }>({
username: "",
robloxId: 0,
profilePicture: ""
});
const reserveRobloxAccounts = ref<username: string, robloxId: number, profilePicture: string[]>([]);

function setActiveAccount(robloxId: number) {
for (let i = 0; i < reserveRobloxAccounts.value.length; i++) {
if (reserveRobloxAccounts.value[i].robloxId == robloxId) {
const temp = reserveRobloxAccounts.value[i];
reserveRobloxAccounts.value.splice(i, 1);
console.log(robloxAccount.value)
reserveRobloxAccounts.value.push(robloxAccount.value);
robloxAccount.value = {
username: temp.username,
robloxId: temp.robloxId,
profilePicture: temp.profilePicture,
};
console.log(robloxAccount.value)
break;
}
}
}

watch(userDataStore, (data) => {
robloxAccount.value = data.robloxAccount;
reserveRobloxAccounts.value = data.reserveRobloxAccounts;
});

watch(robloxAccount, (data) => {
console.log("hello world"); //this doesnt run after you change the robloxAccount variable in the setActiveAccount function.
});
</script>
3 replies
DIAdiscord.js - Imagine an app
Created by 🧋 on 4/2/2024 in #djs-questions
I need help with this error
The error is happending because libuuid.so cant be found Judging by the name, i assume libuuid is used fir generating uuid's. You should open an issue with the package youre using on their github
7 replies
DIAdiscord.js - Imagine an app
Created by 🧋 on 4/2/2024 in #djs-questions
I need help with this error
This isnt a d.js related issue
7 replies
DIAdiscord.js - Imagine an app
Created by black on 4/2/2024 in #djs-questions
Unknown interaction, sometimes
You could run "ping" in the background and watch for spikes in ping. When thr bot crashes, you can look at the ping logs to see if there was a massive spike in ping or not
20 replies
NNuxt
Created by Eternal on 3/19/2024 in #❓・help
how to configure tree shaking
Adding Nuxt UI adds a whole 0.5 mb of code even if i only use dropdowns and nothing else
2 replies
TTCTheo's Typesafe Cult
Created by Eternal on 3/15/2024 in #questions
rolling your own auth
Thanks
5 replies
TTCTheo's Typesafe Cult
Created by techhjork on 5/20/2023 in #questions
Credentials Signin NextJs
6 replies
TTCTheo's Typesafe Cult
Created by techhjork on 5/20/2023 in #questions
Credentials Signin NextJs
It says which GitHub issue to check in the error message
6 replies
TTCTheo's Typesafe Cult
Created by Giacomo on 5/20/2023 in #questions
Simple server solution when serverless is not enough
Now I'm Theo, or even an intern. But if I had this problem and I was hell bent on keeping server less in there, Id have a server always running. Server less sends post request to that server, like you suggested yourself. One problem would be fear of someone finding that server on shodan or whatever. So use an auth header? Don't have to be complex. Idk, that's just my two cents.
4 replies
TTCTheo's Typesafe Cult
Created by Eternal on 2/18/2023 in #questions
New to fullstack
oooh. Thanks!
11 replies
TTCTheo's Typesafe Cult
Created by Eternal on 2/18/2023 in #questions
New to fullstack
I'm not a complete beginner. I've written some backend database code and server code. I've made things like login, register, getting user profiles. But thats all backend, and thats only the surface. I glanced over TheOdinProject and it dosnt anwer my questions, and FullStackOpen is too darn long. It would be great if you could answer some of my questions here. Oh, and after some research on what frameworks to use, I've settled on Vue. \
11 replies
TTCTheo's Typesafe Cult
Created by Eternal on 2/17/2023 in #questions
ExpressJS router not working
Nevermind, fixed Since i'm attaching the router to "/api/login", I need to change the path the router is on in login.js from router.post("/api/login" to router.post("/"
2 replies