Skip to content

Tag: javascript

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): And when trying that I get this error: 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…

Why doesn’t this invalid syntax throw an error?

I would expect the code below to throw a syntax error, because of ‘some string’ [{}], but it just works fine. Although the property is undefined. This on the other hand throws an error as expected: Answer The first is not invalid syntax. That code is looking for a property [object Object] (the {} …

JavaScript crypto.randomBytes(8) to Python Code

I am working with Python in an API. The API is coded using Javascript, and I do not know how would be the equivalent code of this line in Python: I found out this link https://docs.python.org/3/library/uuid.html, but I do not know what to do to get exactly the same result. Thank you for your help Answer Try: …