Steal command for stickers !!

If it is an animated sticker, then it is not working.
25 Replies
d.js toolkit
d.js toolkit2w ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
✗ A D A R S H
├─┬ discord-giveaways@5.2.2 │ └── discord.js@13.17.1 deduped └── discord.js@13.17.1 and node -v v20.14.0
Amgelo
Amgelo2w ago
define "not working" we need more than just that to help
✗ A D A R S H
If I try to steal an animated sticker, the bot uploads the sticker, but it doesn't remain animated and instead becomes static.
Amgelo
Amgelo2w ago
can you show your code
✗ A D A R S H
@Amgelo check this code i gave another code by mistake then tell me how to solve
d.js docs
d.js docs2w ago
:method: GuildStickerManager#create @14.15.3 Creates a new custom sticker in the guild.
// Create a new sticker from a URL
guild.stickers.create({ file: 'https://i.imgur.com/w3duR07.png', name: 'rip', tags: 'headstone' })
.then(sticker => console.log(`Created new sticker with name ${sticker.name}!`))
.catch(console.error);
// Create a new sticker from a URL
guild.stickers.create({ file: 'https://i.imgur.com/w3duR07.png', name: 'rip', tags: 'headstone' })
.then(sticker => console.log(`Created new sticker with name ${sticker.name}!`))
.catch(console.error);
✗ A D A R S H
so is this code is now correct for both emoji and sticker check and tell me
✗ A D A R S H
@Qjuh what ? no My bot cannot fetch emojis and stickers only gif but in static it works good and also upload to the server
✗ A D A R S H
Error processing interaction: DiscordAPIError: Invalid Form Body
image: Invalid image data
at RequestHandler.execute (F:\TRICK\node_modules\discord.js\src\rest\RequestHandler.js:350:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async RequestHandler.push (F:\TRICK\node_modules\discord.js\src\rest\RequestHandler.js:51:14)
at async GuildEmojiManager.create (F:\TRICK\node_modules\discord.js\src\managers\GuildEmojiManager.js:69:19)
at async InteractionCollector.<anonymous> (F:\TRICK\commands\information\addemoji.js:144:25) {
method: 'post',
path: '/guilds/1249048584083738736/emojis',
code: 50035,
httpStatus: 400,
requestData: {
json: { image: 'data:image/jpg;base64,', name: 'emoji' },
files: []
}
}
Error processing interaction: DiscordAPIError: Invalid Form Body
image: Invalid image data
at RequestHandler.execute (F:\TRICK\node_modules\discord.js\src\rest\RequestHandler.js:350:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async RequestHandler.push (F:\TRICK\node_modules\discord.js\src\rest\RequestHandler.js:51:14)
at async GuildEmojiManager.create (F:\TRICK\node_modules\discord.js\src\managers\GuildEmojiManager.js:69:19)
at async InteractionCollector.<anonymous> (F:\TRICK\commands\information\addemoji.js:144:25) {
method: 'post',
path: '/guilds/1249048584083738736/emojis',
code: 50035,
httpStatus: 400,
requestData: {
json: { image: 'data:image/jpg;base64,', name: 'emoji' },
files: []
}
}
No description
✗ A D A R S H
@Qjuh bro plz help...
duck
duck2w ago
(this is v13 where it apparently does take 3 separate params)
✗ A D A R S H
await message.guild.stickers.create(currentItemUrl, name, 'sticker').then((newSticker) => {
interaction.reply({
content: `Successfully stole the sticker ${newSticker.name}!`,
ephemeral: true
});
await message.guild.stickers.create(currentItemUrl, name, 'sticker').then((newSticker) => {
interaction.reply({
content: `Successfully stole the sticker ${newSticker.name}!`,
ephemeral: true
});
this wont work ??
message.guild.stickers.create(currentItemUrl, name, 'sticker').then((newSticker)
message.guild.stickers.create(currentItemUrl, name, 'sticker').then((newSticker)
so what can i do so that i can fix my issue
duck
duck2w ago
before answering this, what format is the sticker in?
✗ A D A R S H
if i use the command in a static sticker then bot didnt reply but if i use for an animated sticker bot is replying but uploading the animated sticker to static sticker
duck
duck2w ago
I meant between apng and lottie
✗ A D A R S H
lottie @duck
duck
duck2w ago
I can't seem to find the previous issue I was thinking of, but iirc there was some issue relating to how discord handles lottie stickers but since I can't find it and I'm not fully sure if it's still around, could you try manually reuploading the sticker just to test?
✗ A D A R S H
ok @duck can you tell me how can i solve this error
Error processing interaction: TypeError [REQ_RESOURCE_TYPE]: The resource must be a string, Buffer or a valid file stream.
at DataResolver.resolveFile (F:\TRICK\node_modules\discord.js\src\util\DataResolver.js:127:11)
at MessagePayload.resolveFile (F:\TRICK\node_modules\discord.js\src\structures\MessagePayload.js:260:41)
at GuildStickerManager.create (F:\TRICK\node_modules\discord.js\src\managers\GuildStickerManager.js:60:47)
at InteractionCollector.<anonymous> (F:\TRICK\commands\information\addemoji.js:159:54)
at InteractionCollector.emit (node:events:531:35)
at InteractionCollector.handleCollect (F:\TRICK\node_modules\discord.js\src\structures\interfaces\Collector.js:110:12)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
[Symbol(code)]: 'REQ_RESOURCE_TYPE'
}
Error processing interaction: TypeError [REQ_RESOURCE_TYPE]: The resource must be a string, Buffer or a valid file stream.
at DataResolver.resolveFile (F:\TRICK\node_modules\discord.js\src\util\DataResolver.js:127:11)
at MessagePayload.resolveFile (F:\TRICK\node_modules\discord.js\src\structures\MessagePayload.js:260:41)
at GuildStickerManager.create (F:\TRICK\node_modules\discord.js\src\managers\GuildStickerManager.js:60:47)
at InteractionCollector.<anonymous> (F:\TRICK\commands\information\addemoji.js:159:54)
at InteractionCollector.emit (node:events:531:35)
at InteractionCollector.handleCollect (F:\TRICK\node_modules\discord.js\src\structures\interfaces\Collector.js:110:12)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
[Symbol(code)]: 'REQ_RESOURCE_TYPE'
}
duck
duck2w ago
well the error seems straightforward, but on the assumption this is a follow up to manually reuploading the sticker, I meant manually uploading it through your discord client (not through the bot)
✗ A D A R S H
ok done it has upload so now what ?
duck
duck2w ago
and was it animated? or did it encounter the same issue?
✗ A D A R S H
animated by uploading it manually it is animated
duck
duck2w ago
then frankly I'm not really sure unlike with other assets, stickers are restricted to one specific file type based on format, so there wouldn't be any mixup with what extension is being returned djs doesn't transform the data in any way, so especially if there were no issues reuploading it manually, there shouldn't be any issues there