BPM-for-Discord icon indicating copy to clipboard operation
BPM-for-Discord copied to clipboard

Discord blocks requests to emote image hosts (s3)

Open ByzantineFailure opened this issue 6 years ago • 3 comments

Currently in the canary request to s3, where the emotes are hosted, are blocked and will not go through. This hard breaks BPM.

After bandying about a few solutions, I think the best solution is:

  1. When an emote is found, send a message to the backend with the image url of the emote.
  2. Have the backend make that request from the Electron layer rather than from the frontend. Use a cache here and do not re-request unless necessary.
  3. Replace the url or background-image w/ url with a base-64 version of it in the frontend CSS.

Do this on a per-emote basis. We'll lose some cache capability built-in from chromium, but things will work again.

Other options include potentially rehosting all the images on Discord, but that is a srsbsns abuse of their platform and will likely lead to a Bad End.

ByzantineFailure avatar Jul 23 '18 18:07 ByzantineFailure

Working prototype written over the weekend. Needs cleanup but we have a viable path forward.

ByzantineFailure avatar Jul 29 '18 18:07 ByzantineFailure

This methodology is unusably slow and non-performant under real-life circumstances (hangs discord for several minutes upon entering a server with many emotes).

At this point, I don't have the energy to pursue different solutions. If someone submits a working commit to me I'll hand over ownership of the repo to them as I don't have the capability of keeping up with the needs of this project anymore.

ByzantineFailure avatar Aug 24 '18 15:08 ByzantineFailure

It's a shame that this method didn't succeed. I hope this doesn't lead to the end of BPM on discord, but I'm not sure of a way out unless you want to only use the browser version.

CrystalSplitter avatar Aug 25 '18 02:08 CrystalSplitter