must be this curl to ride: why discord is harmful
be0baDiscord is considered harmful
Discord is trash. We know this, but it’s becoming hard to avoid. Today, someone in the grid was trying to use the Discord API using hget.
I know what you’re thinking (beyond “Why?!”). They weren’t even doing anything wrong. It should’ve worked. hget passed everything along, webfs did its thing. Yet, the API persistently returned 403 You suck
. Since curl works, and hget is doing the same thing, what could the issue be? The astute among you may have already seen this coming.
Those useless assholes filter requests based on the User-Agent
header.
So, for anyone wanting to use this trash with hget, or any other site that doesn’t seem to work with hget, try something like this:
term% hget -r 'Authorization: Bot DISCORDCONSIDEREDHARMFUL' -r 'User-Agent: curl/8.0.1' -m GET https://discord.com/api/channels/CHANNELID/messages?list=1