#Using gateway and HTTP

10 messages · Page 1 of 1 (latest)

safe fable
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

karmic citrus
#

HTTP interactions are miserable to deal with currently, I'd recommend just using the gateway

#

discord.js doesn't have a way of creating structures for the api data, which means you have to implement all routes yourself

runic niche
#

well you have @discordjs/rest and discord-api-types to help a bit with that, but i have no idea how to handle http interactions

karmic citrus
#

@discordjs/rest is also not great for the edge because it uses eventemitter & undici, which have problems being bundled.

#

ofc if you're using a dedicated server, you can use it

karmic citrus
#

I don't see a situation which it would be slower, if you're using a vanilla node.js server. The problem is still re-inventing the wheel - discord-api-types is not easy to use/find the correct types for, and there's no "easy" way of making api calls

#

of course using /rest will make things much easier, but you still need to deal with typings and having to do the api calls manually, rather than for example interaction.reply(...)

solemn nova
#

If you mean the guild having an outage then of course not. If you mean your node process handling that guild then the opposite would be true too:
If your HTTP endpoint has an outage then all interactions would fail, not only one shard

solemn nova
#

What makes you say that? Got any data that would suggest that?