Discord.js: HELP: message.replace

Created on 20 Jan 2018  Â·  1Comment  Â·  Source: discordjs/discord.js

Hi, i have this:
client.on("message", (message) => {
if (message.content.startsWith ('-lis ')) {
var p1 = message.content.replace("-lis ", "")
const embed = {
"title": "<:Lis:404390869576450048> Life Is Strange",
"color": 14396413,

        "fields": [
            {
                "name":  p1 + '´ information',
                "value": "[**Click here to open the character' profile**](http://pt-br.life-is-strange.wikia.com/wiki/" + p1 + ')',
                "inline": true
            }
        ]
    }
    message.channel.send({embed});
}

});
It send's this:
image

I want the bot send all character's name but on link just the 1st name, like that:
image

question (please use Discord instead)

Most helpful comment

__The issue tracker is only for bug reports and enhancement suggestions. If you have a question, please ask it in the Discord server instead of opening an issue – you will get redirected there anyway.__

>All comments

__The issue tracker is only for bug reports and enhancement suggestions. If you have a question, please ask it in the Discord server instead of opening an issue – you will get redirected there anyway.__

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LLamaFTL picture LLamaFTL  Â·  3Comments

ghost picture ghost  Â·  3Comments

tiritto picture tiritto  Â·  3Comments

BrandonCookeDev picture BrandonCookeDev  Â·  3Comments

iCrawl picture iCrawl  Â·  3Comments