Skip to content
Advertisement

How do I send a sticker in Discord.js

I can’t figure out how to send a sticker in discord.js. Here is my code (ids removed):

JavaScript

And when trying that I get this error:

JavaScript

But if I just try stickers: client.guilds.cache.get('guild id').stickers.cache it works but instead sends every sticker in the server

Does anyone know what this error means, how to fix it, and if there is just a better way of doing all this? Thanks.

Advertisement

Answer

@isaac.g said:

it looks like stickers still needs to be a Collection so try stickers: client.guilds.cache.get("guild id").stickers.cache.filter(s => s.id === "sticker id")

And that worked fine for me.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement