add ignore private messages

This commit is contained in:
MSFTserver 2017-11-16 10:12:09 -08:00 committed by GitHub
parent 7f274408a8
commit 04e33676dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,9 +1,14 @@
let inPrivate = require("../helpers.js").inPrivate;
exports.custom = [
"lbrylink" //change this to your function name
]
exports.lbrylink = function(bot, msg, suffix) {
bot.on('message', msg => {
if (inPrivate(msg)) {
return;
}
var link = msg.content.indexOf("lbry://")
if (link != -1) {
var text = msg.content.replace("lbry://", "https://open.lbry.io/");