-
Notifications
You must be signed in to change notification settings - Fork 34
Prevent people from pinging @channel #387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
|
@MeMyselfMirai If you fix the merge conflict (It's a formatting thing), this looks very good. I'd like to see this in dev |
| if "@" in name: | ||
| name = "@ ".join(name.split("@")) | ||
| if "<!" in name: | ||
| name = "<! ".join(name.split("<!")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just use .replace()?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is .replace() better than splitting it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my mind, it accomplishes the same thing. What do you recommend changing it to that doesn't delete the evidence of their attempt to mass ping
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does the same thing in that you get the same string at the end. However, replace expresses the intent better, and it probably runs faster because the C is optimized for this use case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above
|
oh this is super old |
Disagree. If @MeMyselfMirai doesn't want to do it, I will, I just want to give the original author a chance first |
You're welcome Joe.
A few days ago, this happened:

This change inserts spaces after any @ signs in major project submissions. This should prevent such a ping from happening again.