mirror of
https://github.com/LBRYFoundation/lbry-wunderbot.git
synced 2025-09-03 12:30:16 +00:00
add ignore private messages
This commit is contained in:
parent
7f274408a8
commit
04e33676dd
1 changed files with 5 additions and 0 deletions
|
@ -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/");
|
||||
|
|
Loading…
Add table
Reference in a new issue