-
-
Notifications
You must be signed in to change notification settings - Fork 442
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
Add mod button-like placeholders in right click commands #3765
Add mod button-like placeholders in right click commands #3765
Conversation
Tested and works great! Thanks mm2pl Edit: I do think its a bit weird that these new placeholders only work for commands when right clicking them rather than just typing like normal. I feel like the behavior of a command (other than the input) shouldn't change based on whether you type it or use the message context menu. |
After a brief look code looks good, I'll test these changes later on 👌 |
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.
yea it works good
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.
Works as expected! Merge this it when you're happy with it @zneix
…ght_click_commands
Pull request checklist:
CHANGELOG.md
was updated, if applicableDescription
This also adds new placeholder
input.text
which returns the text the user has in their SplitInput. I've also changed behavior of CommandController to use variables given to it first then try to use global ones.Some things I came up with:
/reply
/raw @reply-parent-msg-id={msg.id} PRIVMSG #{channel.name} :{input.text}
/quote_reply
/raw @reply-parent-msg-id={msg.id} PRIVMSG #{channel.name} :{input.text} > {1+}
/translate
/openurl https://translate.google.com/?sl=auto&tl=en&text={1+}&op=translate
You can somewhat use right-click commands like normal ones even with custom placeholders:
/testing
/testing {input.text;NaM}
testing {text in split input}
if used from right-click command orNaM
if not