add link on url title
This commit is contained in:
parent
24c77103a9
commit
7d01477469
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@ bot.global.text(/(https?:\/\/.*)[, $]?/i, (b) => {
|
||||||
var re = /<title>([^<]*)<\/title>/gi;
|
var re = /<title>([^<]*)<\/title>/gi;
|
||||||
var match = re.exec(body);
|
var match = re.exec(body);
|
||||||
if (match && match[1]) {
|
if (match && match[1]) {
|
||||||
b.respond(":link: _" + match[1] + "_");
|
b.respond("[:link:](" + b.match[1] + ") _" + match[1] + "_");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue