#does anyone know why Im getting this error? class sendAPICallback extends dAPIMessage {
1 messages · Page 1 of 1 (latest)
1: that ^ is supposed to be shown in a monospace font
2: probably circular dependency. show more info
class sendAPICallback extends dAPIMessage {
^
TypeError: Class extends value undefined is not a constructor or null
at Object.<anonymous> (C:\Users\Brandon Nguyen\Desktop\DiscordBot\node_modules\discord-buttons\src\v12\Classes\APIMessage.js:7:31)```
@trim sky
have you imported dAPIMessage?
i dont think so, how would i do that?
the same way you import any other file. i assume your project has multiple files
yes a bunch of files
i would like to avoid rewriting if all possible lol
its been like 12 days straight I've been writing this
oh, just now I seen, the error doesn't happen in your code
looks like discord-buttons is not properly installed
how would i go about properly install installing that? just npm install discord-buttons?
the library is deprecated, so i suggest you to migrate first, before trying to fix any problems
how would i migrate?
yes, kinda
what are you using the lib for? i'm not familiar with it
too be completely honest, I followed yt videos, online guides from discord.js, and some github codes here and there so I don't know what lib is used for
i just installed the necessary packages people said and started writing
i'm not sure, but this lib may let you make buttons of different colors? if you don't care about that, then you should just ignore the lib
docs are your best guides
i've been looking and the closest answer i found is to rollback discord.js to 12.5.3 but then i run code and it says 12 is no longer supported and i need v13
the deprecation message provides a server
i think you should join there and ask, since they know better stuff about the library
@pastel gyro stop using discord-buttons
djs has buttons build in
upgrade to the latest release, then follow the button guide pinned in #archive-interactions
We do not provide any help with third party libraries like discord-buttons.
• Discord.js supports buttons natively: guide
@peak cove can you please give me an example on how you set a different color in current v13?
different color of what
<:_:874569335308431382> MessageButton#setStyle()
Sets the style of this button
yes, but it takes a number? is that supposed to be the hex?
it takes a number or a messagebuttonstyle which is a string
the number is just to get the string of the enum
ah, i see, so that library was just masking SUCCESS and DANGER with red and green
wut
there are only like 5 styles you can set
you can't change the style to anything else
the library uses the following syntax: .setStyle("red")
yes
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
@pastel gyro, removing the lib altogether shouldn't be a problem, since the syntax is similar in discord.js. you just have to change a thing or two
i got discord-buttons deleted but not im getting another error lol
const got = require("got");
im getting this now Error [DISALLOWED_INTENTS]: Privileged intent provided is not enabled or whitelisted.
at WebSocketManager.createShards (C:\Users\Brandon Nguyen\Desktop\DiscordBot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:250:15)