FakeNitro: fix non apng gif stickers being sent as images (#2050)
This commit is contained in:
parent
817cb9b60b
commit
40b3ec57ce
1 changed files with 8 additions and 1 deletions
|
@ -787,7 +787,14 @@ export default definePlugin({
|
|||
if (sticker.available !== false && (canUseStickers || sticker.guild_id === guildId))
|
||||
break stickerBypass;
|
||||
|
||||
const link = this.getStickerLink(sticker.id);
|
||||
// [12/12/2023]
|
||||
// Work around an annoying bug where getStickerLink will return StickerType.GIF,
|
||||
// but will give us a normal non animated png for no reason
|
||||
// TODO: Remove this workaround when it's not needed anymore
|
||||
let link = this.getStickerLink(sticker.id);
|
||||
if (sticker.format_type === StickerType.GIF && link.includes(".png")) {
|
||||
link = link.replace(".png", ".gif");
|
||||
}
|
||||
if (sticker.format_type === StickerType.APNG) {
|
||||
this.sendAnimatedSticker(link, sticker.id, channelId);
|
||||
return { cancel: true };
|
||||
|
|
Loading…
Reference in a new issue