snarl-screeps
Version:
A screeps plugin for snarl
19 lines (15 loc) • 402 B
JavaScript
module.exports = {
'screeps': function (message, cb) {
var tokens = message.split(' ');
var room;
tokens.forEach(function (token, index) {
if (token === 'room' && tokens[index+1]) {
room = tokens[index+1].toUpperCase();
}
});
if (!room) {
return cb(null);
}
return cb(null, '<https://screeps.com/a/#!/room/' + room + '|' + room + '>');
}
};