Using raw APIInteraction data with DJS

I am no doubt going to sound like a moron with this question and perhaps it's not even something relevant to this Discord.
But here it goes.

I want to build a sort of proxy for interactions on one of my applications. A webhook server if you want to call it that. So far I have the proxy side working as intended; the endpoint URL is set in the dev portal, that sends application commands to the webhook server which then in turn forwards the request body to a Fastify listener on the Discord application side as an APIInteraction.

Now, without needing to rewrite the entire logic of my extensive interactionCreate listeners, I figured a "hacky" workaround would be to use client.emit('interactionCreate', interaction) with
interaction
being the APIInteraction data. Obviously this doesn't work though as the gateway event in DJS expects Interaction<CacheType>.

I will admit I don't understand the backend code of DJS enough to work this out on my own but I'm curious if it's possible for me to somehow put that APIInteraction in to DJS to get back out the type it expects complete with the DJS methods and properties I need (things like isChatInputCommand, isButton, etc)

PS. please don't flame me if I'm being stupid thumbsuppepo
Was this page helpful?