rhh4x0R
rhh4x0R
Explore posts from servers
TtRPC
Created by rhh4x0R on 10/23/2024 in #❓-help
Getting CORS error with tRPC express adapter, locally
No description
4 replies
TtRPC
Created by rhh4x0R on 4/11/2024 in #❓-help
tRPC + React Query Data Invalidation?
Hey y'all, I'm working with tRPC and React Query and just trying to understand how this works. I have a call that basically sees if the server is online or offline, however, when I disconnect the server I'll get the error eventually on the client, but it won't nullify the query data. Is that normal? Perhaps it just keeps it in the cache -- can I invalidate it to get the proper info? Ex. it'll show online when it's up, but when I turn it off it'll show... error fetching online Not sure why that's the case here.
const query = trpcReact.health.useQuery();

return (
<>
<h1>Dashboard</h1>
{query.isLoading ? 'loading...' : null }
{query.isError ? 'error' : null }
{query.isFetching ? 'fetching' : 'not fetching'}
{query.data != null && query.data.ok ? 'online' : 'offline'}
const query = trpcReact.health.useQuery();

return (
<>
<h1>Dashboard</h1>
{query.isLoading ? 'loading...' : null }
{query.isError ? 'error' : null }
{query.isFetching ? 'fetching' : 'not fetching'}
{query.data != null && query.data.ok ? 'online' : 'offline'}
9 replies
TTCTheo's Typesafe Cult
Created by rhh4x0R on 1/4/2024 in #questions
uploadingThing without UI?
Hey all, I'm trying to use uploadthing without a frontend. I'd basically make a csv file and then upload it to uploadthing. I'm having trouble with the syntax as I don't need a router (I think) or middleware -- just want to upload the file. Is this possible?
6 replies
DIAdiscord.js - Imagine an app
Created by rhh4x0R on 12/30/2023 in #djs-questions
Removing bot from servers
Hey y'all, I'm trying to remove my bot from quite a few servers. I'm running a script from my computer that logs into the bot and finds the cache, then leaves them. It seemed to have temp banned my personal IP (and not my bot), due to rate limiting I'm sure. What's the best way to go about getting this bot out of many differnet servers?
27 replies
TtRPC
Created by rhh4x0R on 8/24/2023 in #❓-help
How do pass a 'blob' from frontend to backend?
I'm having trouble doing this without converting an audio Blob to base64 and then decrypting it and creating a file on the server. Base64 is huge and breaks the app, but if I create it client side it's no problem. However I don't want to expose API keys that I need in order to do so (which it does currently). Any ideas on what I could do?
4 replies
SIASapphire - Imagine a framework
Created by rhh4x0R on 7/18/2023 in #sapphire-support
Creating a custom UserError
I want to use a custom UserError to create preconditions for my subcommands. I can't find any documentation examples on it. Anyone have any suggestions so that in my custom preconditions class I can call throw new UserError and have it go to my custom function?
40 replies
SIASapphire - Imagine a framework
Created by rhh4x0R on 7/18/2023 in #sapphire-support
Sharding via DJS and Sapphire
Hey y'all, I'm looking at the Discord.JS docs for sharding and wanting to implement that within Sapphire. From my search in this server I found to use the DJS method of using it as Sapphire doesn't support extra with that. However, there isn't a ShardManager included in Sapphire, and I still want to use the Sapphire Client options. Is that still possible with Sapphire or do I have to eliminate the SapphireClient completely (which defeats the purpose?) Cheers.
13 replies
DIAdiscord.js - Imagine an app
Created by rhh4x0R on 1/2/2023 in #djs-questions
Passing metadata from bot OAuth2 Invite link?
I'm wanting to pass a variable from an oauth2 invite link and then read it when the bot is added to the server. I'm not finding anything besides somehow passing 'state' in the URL -- but I'm not able to read it on the 'guild' object when I add it to the server. Any ideas? Thanks.
3 replies