Closed anshtyagi0 closed 3 years ago
I have just checked the syntax, values and all, could not reproduce. Could you show me your code from line 189 to line 213?
ok
return client.users.cache.get(support.targetID).send(`Your ticket #${actualticket} has been closed! If you wish to open a new ticket, feel free to message me.`)
}
};
})
client.on("message", async message => {
if(message.content.startsWith(${config.prefix}unblock
){
if(message.guild.member(message.author).roles.cache.has(config.roles.mod)){
var args = message.content.split(" ").slice(1);
client.users.fetch(${args[0]}
).then(user => {
let data = await table.get(isBlocked${args[0]}
);
if(data === true){
await table.delete(isBlocked${args[0]}
);
return message.channel.send(Successfully unblocked ${user.username} (${user.id}) from the modmail service.
);
} else {
return message.channel.send(${user.username} (${user.id}) is not blocked from the modmail at the moment.
)
}
}).catch(err => {
if(err) return message.channel.send("Unknown user.");
})
} else {
return message.channel.send("You can not use that.");
}
}
})
tell bro
This looks like a syntax issue on your side. Could you remove those lines and copy again?
i have did it bro but same error please check your repo
What IDE do you use?
what that means
IDE means the interface or app you use to code your bot, like VS Code, Sublime text - This bug is fixed
npm start
/home/runner/discord-modmail/bot.js:195 if(message.content.startsWith(
${config.prefix}unblock
){ ^SyntaxError: Unexpected token '{' at wrapSafe (internal/modules/cjs/loader.js:915:16) at Module._compile (internal/modules/cjs/loader.js:963:27) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10) at Module.load (internal/modules/cjs/loader.js:863:32) at Function.Module._load (internal/modules/cjs/loader.js:708:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12) at internal/main/run_main_module.js:17:47 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! discord-modmail@1.0.0 start:
node bot.js
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the discord-modmail@1.0.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in: npm ERR! /home/runner/.npm/_logs/2021-03-06T07_21_11_749Z-debug.log exit status 1