mirror of
https://github.com/LBRYFoundation/lbry-wunderbot.git
synced 2025-08-31 09:21:34 +00:00
Merge pull request #100 from MSFTserver/patch-5
fix username issues in lbrylink.js[done]
This commit is contained in:
commit
5fc5df4b45
1 changed files with 5 additions and 3 deletions
|
@ -13,7 +13,10 @@ exports.lbrylink = function(bot, msg, suffix) {
|
|||
if (link != -1) {
|
||||
var text = msg.content.replace("lbry://", "https://open.lbry.io/");
|
||||
var message = GetWordByPos(text, link);
|
||||
if (text.search("<") != -1) {
|
||||
if (message === "https://open.lbry.io/") {
|
||||
return;
|
||||
}
|
||||
if (message.search("<") != -1) {
|
||||
var name = "@" + msg.mentions.members.first().user.username;
|
||||
var trim = message.split("/").pop();
|
||||
var trim2 = trim.substr(2);
|
||||
|
@ -49,8 +52,7 @@ exports.lbrylink = function(bot, msg, suffix) {
|
|||
}
|
||||
const embed = {
|
||||
description:
|
||||
msg.author +
|
||||
", I see you tried to post a LBRY URL, here's a friendly hyperlink to share and for others to access your content with a single click: \n" +
|
||||
"I see you tried to post a LBRY URL, here's a friendly hyperlink to share and for others to access your content with a single click: \n" +
|
||||
"[lbry://" +
|
||||
newname +
|
||||
"](" +
|
||||
|
|
Loading…
Add table
Reference in a new issue