#Create Sticker Error on apng - file DiscordAPIError[50046] Invalid Asset

4 messages · Page 1 of 1 (latest)

hot rapids
#

When updating from v13 to v14 and changing the stickers creating function appropriately, if I use a file apng, the call fails with error

DiscordAPIError[50046]: Invalid Asset
    at SequentialHandler.runRequest (/home/sethdev/WebstormProjects/EmojiUtilities/node_modules/@discordjs/rest/dist/lib/handlers/SequentialHandler.cjs:293:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async SequentialHandler.queueRequest (/home/sethdev/WebstormProjects/EmojiUtilities/node_modules/@discordjs/rest/dist/lib/handlers/SequentialHandler.cjs:99:14)
    at async REST.request (/home/sethdev/WebstormProjects/EmojiUtilities/node_modules/@discordjs/rest/dist/lib/REST.cjs:52:22)
    at async GuildStickerManager.create (/home/sethdev/WebstormProjects/EmojiUtilities/node_modules/discord.js/src/managers/GuildStickerManager.js:67:21)
    at async /home/sethdev/WebstormProjects/EmojiUtilities/src/commands/stickerfy.js:108:7 {
  rawError: { message: 'Invalid Asset', code: 50046 },
  code: 50046,
  status: 400,
  method: 'POST',
  url: 'https://discord.com/api/v10/guilds/779897232295329793/stickers',
  requestBody: {
    files: [ [Object] ],
    json: { name: 'test', tags: 'face_with_monocle', description: '' }
  }
}
interaction.guild.stickers.create({ file: './temps/udfk55nd.png', name: 'test', tags: 'face_with_monocle' })

Interestingly enough, according from my observations, its only throwing that error with apngs.
If I use a regular non-animated png file, it works fine. I've checked the magic bytes of both my regular pngs and my animated apngs though and they are both are fine. So Im not particularly sure whats happening here?

apng vs png magic byte being the same evidence:
apng https://i.imgur.com/0ZysRss.png
png https://i.imgur.com/0GpJB81.png

pallid graniteBOT
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

hot rapids
#

Create Sticker Error on apng - file DiscordAPIError[50046] Invalid Asset