Why can't bots use this endpoint?
Discord has a REST API, and at `/guilds/{guild.id}/messages/search?author_id={author.id}` users can use this more advanced way of searching.
I think it'd be neat to make a fun little command for my bot to redirect you to the first message you've sent in the server, but when I tried to reach this endpoint manually (discord.js doesn't use it) authenticated as the bot, I got the following error: `{"message": "Bots cannot use this endpoint", "code": 20001}`.
The error itself is pretty straight forward, but why isn't this endpoint available to bots?
-
This is a great idea and needs to be considered!
0 -
This is because searching is actually a really expensive operation on discord's side to do, and such is only users rather than bots. Letting bots use this feature would mean a far greater load on the servers to the point where, if it were widely used, the penalty of indexing so many messages and searching through them would be too great and, largely, unsustainable.
It's also a privacy concern to users! This is a real issue Discord has had in the past, and with which it has been trying to help. For instance, even seeing the message content in a channel, is soon going to be opt-in and verification to be required for large bots. Personally, though I would find this feature useful, it doesn't seem like a good direction for Discord to take, given what strides it's been making towards creating more secure and protected communities by putting these limitations on the API.
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
2 Kommentare