The ID for the everyone
role is the Guild ID.
If you try to do <@&123123>
replacing 123123
with your guild id, it will almost tag everyone
Update: 10th April 2020
Now to mention everyone, all you need is to send the string @everyone: message.channel.send("@everyone");
To obtain the ID for the everyone role, you need to have the guild, which you get on some events like: message
, guildCreate
, and others.
From there: <something>.guild.roles.everyone
, and with that you should be able to get the ID with <something>.guild.roles.everyone.id
.
If you don't have access to the guild on a event, you can get the guild by it's ID with something like:
client.guilds.cache.get('guildID').roles.everyone.id
, if you know that it will be in cache. If you want to be safe, you can do it like this:
client.guilds.fetch('guildID').then(guild => {
let id = guild.roles.everyone.id;
// do something with id
}
or with await:
let guild = await client.guilds.fetch('guildID');
let id = guild.roles.everyone.id;