-
Notifications
You must be signed in to change notification settings - Fork 11k
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
posting to multiple rooms #3601
Comments
I'm fairly sure you could create a hubot script that would do this You can have the bot listen to 'buy [number] [symbol]' and send it to a particular room if a message matches this requirement |
wish there is step by step on how to do that? |
Well you could start by deploying a hubot and linking it to your rocket.chat server. If you're willing to use docker it's easy, copy paste this file in some directory on your server (preferable somewhere in /opt or so) and call it Execute the command The script itself could look something like this (call it `hubot-respond-to-buy.js' or something like that and place it in the data/hubot-scripts folder): module.exports = function (robot) {
function sendMessage(newMessage) {
return robot.adapter.callMethod('sendMessage', {
rid: 'room-id-where-the-message-should-go',
msg: newMessage
})["catch"](function (err) {
return console.error(err);
});
}
robot.hear(/buy ([0-9]+) (.*)/ig, function (msg) {
var newMessage, amount , symbol;
amount = msg.match[1];
symbol = msg.match[2]
newMessage = msg.message.user + ' wants to buy ' + amount + ' of ' + symbol;
sendMessage(newMessage);
});
}; You should replace |
This would be a very nice feature, but unfortunately it does not align with our current roadmap, so it's probable that it would not be implemented in the near future. I will be closing this issue for now, if we plan to add a feature like this we will reopen this issue. Thanks for the valuable feedback! |
Added this as a proposal on #10174 |
Is there a way to add a command or a feature that when someone types a message can automatically sent to another channel for records?
example :
am in general room and i decided to take a trade
"buy 1000 $AAPL" + command
this message will be copied to a different room called #trades
vs me copying that message over?
does it make sense :)
Your Rocket.Chat version:0.34
The text was updated successfully, but these errors were encountered: