why doesn't he find a role?
it button:
it in config.json
29 Replies
- 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.
- Issue solved? Press the button!Your first code block has nothing to do with roles, and you didn't show any code where you refer to your config.json variables, so I don't know what you're expecting to happen
Pastebin
const zgloszenia = require("../../models/zgloszenia");const { Messa...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Are you getting a specific error?
no, only
[WARN] Not found: pls-id
when i click the buttonThat error doesn't come from discord.js
Find where you're logging that, because it's not in the code blocks that you sent
interactionCreate.js
![](https://cdn.answeroverflow.com/1133101235243864175/image.png)
or here
![](https://cdn.answeroverflow.com/1133101431969284176/image.png)
you should probably make your logs different so you actually know where it's coming from
![myDudes](https://cdn.discordapp.com/emojis/1095384615432224861.png)
How do you define inter?
![](https://cdn.answeroverflow.com/1133483600734593155/image.png)
![Thqnkqng](https://cdn.discordapp.com/emojis/264756893614997516.png)
Log collection to the console and show result.
![](https://cdn.answeroverflow.com/1133551164756086785/image.png)
only it
I've done this before, but I don't know if it helps ![Thonk](https://cdn.discordapp.com/emojis/264701195573133315.png)
![Thonk](https://cdn.discordapp.com/emojis/264701195573133315.png)
![](https://cdn.answeroverflow.com/1133553197936549888/image.png)
Is popros supposed to be a command? It’s indeed not in the collection.
“collection” looks like a collection of commands. Your current code can’t find “popros”.
then what should i do to fix it?
Is it supposed to be a command? What do you expect the code to do when the button is pressed and where is that code located?
no, it's not a command, it's just clicking a button, after clicking the button it sends to channel x and then the administration rejects or accepts with the button
Where is the code that handles the "popros” button?
here ↑↓
So it’s named zgloszenie? If that’s the execution code specifically for that button the names would have to match for the execute function to be called.
I changed "popros" to "zgloszenie" and now I have something like this, after clicking the button ;/
![](https://cdn.answeroverflow.com/1134202562376118282/image.png)
how? i tried with
MessageActionRow
and nothing, still the same
consult to the documentation or guide to find out what I should actually use
tries many ways
but unfortunately it exists ;/
there was something written about the version, but I have a good version of 14.11.0All of that looks like v13 code. You need to update that to v14.