r/ModSupport • u/Python_Child • May 08 '23
FYI Introducing CommentPinner: A script where users can pin comments on their posts in your subreddit within seconds!
What does this script do?
This script allows users to pin comments under their own posts in your subreddit
How does it work?
The bot scans for a specific command (by default it is m!pin) and when it detects a command, it verifies the commenter is the person who made the post (meaning users can’t pin comments under someone else's post)
Once it detects and verifies the command, it grabs any message after "m!pin", the script makes a new comment, and then pins its own comment.
Features for moderator only
- The bot will send an alert in mod queue when someone uses the m!pin command so you can check over the message in casean there is anything inappropriate
- You can add naughty users to a ignored user list
- You can change the default command "m!pin" to whatever you want"
- Users can't pin comments on someone else's post so less to worry about
Where can I get the script
https://github.com/KvassBoy/Reddit-Pin-Comment
How do I run the script
All the instructions are on the GitHub page
https://github.com/KvassBoy/Reddit-Pin-Comment
Why did you make this?
I didn't like how there was no feature for regular users to pin their comments on their own posts and I got sick of waiting so I decided to do it myself.
Enjoy and if you have any questions or concerns, please ask away!
View all comments
Show parent comment
2
u/Python_Child May 08 '23
I’m tired and dumb and didn’t realize what they were asking until you explained it (thank you)
I can try working on a feature like that. The 2 ways I could do it is to check if the username is a moderator of a specific subreddit or have it so the username has to be in a “special approved list” or both
The problem is trying to get the parent comment consistently using PRAW
Some solutions I can think of is when pin command is detected, it grabs the parent comment but I could see it failing if you’re trying to pin a reply to a comment
Another way is a mod grabs a link to the comment and does “m!pin link to comment” and the bot grabs the comments and pins it