Hi,
I don't know if the library is still maintained, but wanted to use it in my simple bot. Really great design and API!
One issue I think blocks me for now is missing bot user id in API.
Official Rocket JS SDK filters own bot messages send to a channel:
const processMessages = async(err, message, messageOptions) => {
if (!err) {
// filter our own message
if (message.u._id === myuserid) return;
// can filter further based on message.rid
const roomname = await driver.getRoomName(message.rid);
if (message.msg.toLowerCase().startsWith(BOTNAME)) {
const response = message.u.username +
', how can ' + BOTNAME + ' help you with ' +
message.msg.substr(BOTNAME.length + 1);
const sentmsg = await driver.sendToRoom(response, roomname);
}
}
}
Correct me if I'm wrong but I can't figure myuserid using current API?
Hi, I don't know if the library is still maintained, but wanted to use it in my simple bot. Really great design and API! One issue I think blocks me for now is missing bot user id in API.
Official Rocket JS SDK filters own bot messages send to a channel:
Correct me if I'm wrong but I can't figure
myuserid
using current API?