Cold
Explore posts from serversRReactiflux
•Created by Cold on 12/22/2024 in #react-forum
State not getting updated
I have a project I'm working on currently where I am using zustand for state management. I switched to zustand after encountering similar problems with base state management, but clearly this hasn't helped. I am trying to create a live notification/account update system, where the client uses server-sent events to manage this. The server will send an update every 5 seconds. Now, in the code below, I am very clearly updating the state with this data, but it is not doing anything. Can anyone help me figure out why and help me fix it?
63 replies
PPrisma
•Created by Cold on 12/5/2024 in #help-and-questions
WebStorm issue - not recognizing Prisma client regeneration?
Hi everyone, I am working with Prisma via WebStorm on a TypeScript project. My main issue at the moment is that whenever I run
npx prisma generate
, it seems I have to restart my IDE for WebStorm to actually notice that the model has been regenerated and index the changes. Does anyone know of a workaround?18 replies
SIASapphire - Imagine a framework
•Created by Cold on 5/26/2024 in #sapphire-support
How do I force a user to specify at least one input?
I'm working on a bot, and at the moment the bot errors out if the user does not specify any argument. For reference, this is how my command is structured:
This is how I'm validating whether or not an argument has been specified; but strangely this kicks out an error:
How do I fix this?
6 replies
SIASapphire - Imagine a framework
•Created by Cold on 5/7/2024 in #sapphire-support
Help with slash commands
Hello, I'm trying to work on a project that involves doing some type of user lookup in a database.
My current code looks like this:
Ideally, I want the user to be able to provide either a user @mention, or a user ID, or even a username. What would be the best way to approach this?
7 replies