question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Currently, all the roles in the community are unmentionable. This is in order to prevent spam. Before we made this change, people would occasionally come into the community and just mentionspam all the role mentions.

The problem with this is that we sometimes need to mention a role. For example, we mention the @Announcements role every time we make an announcement. We all desperately wish Discord would allow us to set mention permissions so that only certain roles were allowed to mention other roles, but this is not yet possible.

Currently the manual process looks like this:

  1. We set the role to be mentionable by everyone
  2. We ping the role.
  3. We wait 5-10 seconds
  4. We set the role to be unmentionable.

The reason we need to do step 3 is that if you set the role to unmentionable too soon after you do the ping, Discord has a tendency to mess up the mention. Sometimes it will not ping everyone, other times there will be a ghost ping.

We’d like to automate the above process, so we’re looking for someone to make a !mention command. Here’s what we’d like to see:

  • Only Moderators, Admins and Owners should be able to use it.
  • It takes a role ID or a string as input argument
  • The string should not need to be in quotes, even if it has spaces.
  • When called, the bot should unlock the role for mention and let the caller know that the role has been unlocked.
  • When a role mention for this role is detected in any channel, wait 5 seconds (make this duration configurable), lock the role again and let the caller know that it has been locked in the channel where the unlock was invoked.
  • After 5 minutes (this should be configurable), if no role mention has been detected, the unlock should time out and the role should be locked again. Remember here also to let the caller know that it has been locked in the channel where the unlock was invoked.
  • If invoked on a role that’s already mentionable (like @Admins), return an error message
  • If invoked on a special role (like @everyone), return an error.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
scraglycommented, Oct 5, 2019

Regarding the invoker role vs specific role mentions, I think it’s best to keep that simple and not worry about it. Just have the command itself limited to Mods, Admins and Owners, and have the command check that the role isn’t already mentionable.

0reactions
scraglycommented, Oct 5, 2019

config.yml would be where that would need to be set, and the config name style and structure should match the style of the other configuration options around it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to mention a user mentioned in the command discord js
To get the user object of a mentioned user, you can very simply use the mentions extension of the message object.
Read more >
Mentioning Slash Commands on Discord - Netcord
You can mention Slash Commands on Discord now. Using this trick you can even mention commands that don't exist. Here's how.
Read more >
Mention format for slash commands - Discord Support
How about adding a mention format for slash commands? Like channel or member mentions this makes the command clickable, if the reader has......
Read more >
Parsing mention arguments - Discord.js v12 Guide
Say you are writing a bot for moderating your server. You will want a kick or a ban command, which allows you to...
Read more >
r/discordapp - New formating .... ( Mention commands ) - Reddit
New formating .... ( Mention commands ) · Type in a slash command (e.g. /help ) · Select the respective slash command for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found