#Using gateway and HTTP
10 messages · Page 1 of 1 (latest)
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
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
@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
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(...)
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
What makes you say that? Got any data that would suggest that?