oddiz
oddiz
TTCTheo's Typesafe Cult
Created by Integra on 11/17/2023 in #questions
tRPC splitLink wsLink/httpBatchLink explanation please
hey thanks for the solution! I did kinda the same but I tried to merge the link of ws and trpc with splitLink. Also I didn't create the WsClient inside the same function as httpBatchLink it was on a seperate import. It must've been causing the issues. In the end i scraped the ws implementation maybe i'll try to add again later. this puts a nice perspective on the usage of createInnerContext and link stuff that I wasn't able to understand before. in the mean time hopefully your solution will guide some ppl since it does come up on google. https://github.com/nftchance/siwe-next-auth-trpc-websockets/blob/2ed6847cd03edf24c461f772b8ebb58b6d41e071/utils/api.ts#L29 this part is very important for whoever looking for solution
9 replies
TTCTheo's Typesafe Cult
Created by Integra on 11/17/2023 in #questions
tRPC splitLink wsLink/httpBatchLink explanation please
Hey I'm struggling with the same problem. without using any external libraries when trying to use websocket I had to use splitLink to split wsLink and httpBatchLink. Which leads to events emitted from query and mutations to not reach subscription routes even though the event emitter is initialized at the root. Any solutions for this?
9 replies
DIAdiscord.js - Imagine an app
Created by oddiz on 10/2/2023 in #djs-questions
How to fetch an command interaction and extract message
got it, thanks for the assist ThumbsUp
9 replies
DIAdiscord.js - Imagine an app
Created by oddiz on 10/2/2023 in #djs-questions
How to fetch an command interaction and extract message
you can still see what user typed for interaction in discord UI, so i thought maybe there is a way to fetch it later via API
9 replies
DIAdiscord.js - Imagine an app
Created by oddiz on 10/2/2023 in #djs-questions
How to fetch an command interaction and extract message
but way to do it seems to be without slash commands
9 replies
DIAdiscord.js - Imagine an app
Created by oddiz on 10/2/2023 in #djs-questions
How to fetch an command interaction and extract message
I'm adding chatgpt integration to my bot so I'd like to add previous messages to the query
9 replies
DIAdiscord.js - Imagine an app
Created by oddiz on 10/2/2023 in #djs-questions
How to fetch an command interaction and extract message
to be clear I'd like to get what user typed for the slash command when I fetch messages of the channel is there any way to fetch that interaction object with it's id? From what I've seen the only time I can get interaction.option is when it's fired up from client event listener. when I fetch the messages in a channel I get the Message object @Qjuh linked but message.interaction doesn't have options key, it only has id, type, commandName, user
9 replies