Set the default sticker size to 2048 to prevent downscaling, also, time to put this into a second branch

This commit is contained in:
byron 2024-03-31 23:04:32 -04:00
parent 570e41b95c
commit 2c11a7ad84

View file

@ -56,7 +56,7 @@ function getUrl(data: Data) {
if (data.t === "Emoji") if (data.t === "Emoji")
return `${location.protocol}//${window.GLOBAL_ENV.CDN_HOST}/emojis/${data.id}.${data.isAnimated ? "gif" : "png"}`; return `${location.protocol}//${window.GLOBAL_ENV.CDN_HOST}/emojis/${data.id}.${data.isAnimated ? "gif" : "png"}`;
return `${window.GLOBAL_ENV.MEDIA_PROXY_ENDPOINT}/stickers/${data.id}.${StickerExt[data.format_type]}`; return `${window.GLOBAL_ENV.MEDIA_PROXY_ENDPOINT}/stickers/${data.id}.${StickerExt[data.format_type]}?size=2048`;
} }
async function fetchSticker(id: string) { async function fetchSticker(id: string) {
@ -87,9 +87,6 @@ async function cloneSticker(guildId: string, sticker: Sticker) {
body: data, body: data,
}); });
new Logger("EmoteCloner").info("hiiii hi hi hi :3 " + data);
new Logger("EmoteCloner").info("hiiii hi hi hi :3 " + sticker.name);
FluxDispatcher.dispatch({ FluxDispatcher.dispatch({
type: "GUILD_STICKERS_CREATE_SUCCESS", type: "GUILD_STICKERS_CREATE_SUCCESS",
guildId, guildId,
@ -165,7 +162,7 @@ async function doClone(guildId: string, data: Sticker | Emoji) {
message = JSON.parse(e.text).message; message = JSON.parse(e.text).message;
} catch { } } catch { }
new Logger("EmoteCloner").error("Failed to clone", data.name, "to", guildId, e); new Logger("EmoteCloner").error("Failed to clone", data.name, "to server ", guildId, e);
Toasts.show({ Toasts.show({
message: "Failed to clone: " + message, message: "Failed to clone: " + message,
type: Toasts.Type.FAILURE, type: Toasts.Type.FAILURE,