Error with @everyone ping
Reposting from #djs-help-v14 because answering took longer than expected.
What i do:
Click on the button "ping bot owner" (Wrong name but ok)
Expected result: Ping @everyone
Actual result: Says "there was an error while executing this button"
Code: https://replit.com/@OttiOtta/HelperBot
Error message and interaction object
https://srcb.in/AhnWYC5Cwq
https://srcb.in/nDP9Ygr8gb
13 Replies
- 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!
- ✅
Marked as resolved by OPok
guild.defaultRole is not a thing
unless you are modifying discord.js structures somewhere
What is the correct way of pinging @everyone?
You can use <Guild>.roles.everyone.toString() or literally just use
@everyone
shows @everyone without actually pinging
Did you set restrictions regarding mentions when defining the client?
either that or quite simply missing the permission to ping everyone
It has admin
Maybe, i don't know what that means and how to remove them
You can control which entities receive notifications via the
allowedMentions
option. You can:
- Set a default on the client
- Set for a specific message
- Use the repliedUser
key to disable in-line reply mentions
helped!