i can’t fix the error " ‘}’ expected. " Have anyone a idea? [closed]

  discord.js, javascript

Edit: I tried a bracket but it doesn’t work

The following is the code for the text.js file. I hope you have an idea

(I must write more text……………………………………………………….)

I try all to fix this, the error (and yes, im new in programming with js):

{
    "resource": "/c:/Users/olebo/OneDrive/Dokumente/GitHub/OleLive-Bot-Beta/commands/test.js",
    "owner": "typescript",
    "code": "1005",
    "severity": 8,
    "message": "'}' expected.",
    "source": "ts",
    "startLineNumber": 23,
    "startColumn": 7,
    "endLineNumber": 23,
    "endColumn": 7,
    "relatedInformation": [
        {
            "startLineNumber": 8,
            "startColumn": 10,
            "endLineNumber": 8,
            "endColumn": 11,
            "message": "The parser expected to find a '}' to match the '{' token here.",
            "resource": "/c:/Users/olebo/OneDrive/Dokumente/GitHub/OleLive-Bot-Beta/commands/test.js"
        },
        {
            "startLineNumber": 6,
            "startColumn": 19,
            "endLineNumber": 6,
            "endColumn": 20,
            "message": "The parser expected to find a '}' to match the '{' token here.",
            "resource": "/c:/Users/olebo/OneDrive/Dokumente/GitHub/OleLive-Bot-Beta/commands/test.js"
        },
        {
            "startLineNumber": 3,
            "startColumn": 18,
            "endLineNumber": 3,
            "endColumn": 19,
            "message": "The parser expected to find a '}' to match the '{' token here.",
            "resource": "/c:/Users/olebo/OneDrive/Dokumente/GitHub/OleLive-Bot-Beta/commands/test.js"
        }
    ]
}

And the Code in this is the error:

module.exports = {
    name: 'text',
    description: 'Display info about the server.',
    execute(message) {
        if (!message.member.hasPermission(['ADMINISTRATOR'])) return message.reply("You cant use that")
    else {
        message.delete()
        let text = message.content.substring(6);
        if (!text) return message.reply(`Please provide **text** after the command to embed`)
 
        let embed = new Discord.MessageEmbed()
            .setColor('BLACK')
            .setAuthor('Syprant Gaming')
            .setDescription(`${text}`)
 
        try {
            message.channel.send(embed);
        } catch (err) {
            console.warn(err);
         }
 

Source: Ask Javascript Questions

LEAVE A COMMENT