modmail-dev / Modmail

A Discord bot that functions as a shared inbox between staff and members, similar to Reddit's Modmail.
https://docs.modmail.dev
GNU Affero General Public License v3.0
1.57k stars 4.59k forks source link

LOTTIE discord default sticker fails to retrieve #3119

Closed lorenzo132 closed 2 years ago

lorenzo132 commented 2 years ago

Bot Version

v3.11.0-dev1

How are you hosting Modmail?

Systemd

Error Logs

Screenshots

Additional Information

https://discord.com/channels/359577438101176320/911664310487486576/911668656033919038

fourjr commented 2 years ago

can explore https://pypi.org/project/lottie/ to convert lottie -> gif

fourjr commented 2 years ago

Hey, after exploring how we can handle this... here are a couple options:

  1. Generate a GIF within Modmail (takes ~10 seconds)
  2. Pre-generate all GIFs and store it in Modmail/another external repo
  3. Only generate the first frame (takes ~0.08 seconds)

I'm personally in favour of the 3rd option, 10 seconds for sending a message would definitely take too long and pre-generating gifs require constant updating on our side. Thoughts?

Does anyone know how often discord updates these stickers?

TheDiscordHistorian commented 2 years ago

Hey, after exploring how we can handle this... here are a couple options:

  1. Generate a GIF within Modmail (takes ~10 seconds)
  2. Pre-generate all GIFs and store it in Modmail/another external repo
  3. Only generate the first frame (takes ~0.08 seconds)

I'm personally in favour of the 3rd option, 10 seconds for sending a message would definitely take too long and pre-generating gifs require constant updating on our side. Thoughts?

Does anyone know how often discord updates these stickers?

Users can also send custom stickers if they have nitro so maintaining would be difficult (Lottie is locked to partnered / verified servers), I agree with the 3rd option but just generate a png instead of a gif if it’s possible or 3rd as is works imo.

fourjr commented 2 years ago

If partnered servers can do LOTTIE as well, best to just generate a thumbnail.

lorenzo132 commented 2 years ago

Hey, after exploring how we can handle this... here are a couple options:

  1. Generate a GIF within Modmail (takes ~10 seconds)
  2. Pre-generate all GIFs and store it in Modmail/another external repo
  3. Only generate the first frame (takes ~0.08 seconds)

I'm personally in favour of the 3rd option, 10 seconds for sending a message would definitely take too long and pre-generating gifs require constant updating on our side. Thoughts?

Does anyone know how often discord updates these stickers?

would be nice to make it a config option, to either have it as opt 1 or 3