55
rated 0 times
[
58]
[
3]
/ answers: 1 / hits: 54615
/ 5 Years ago, tue, april 23, 2019, 12:00:00
when i make a embed and run the bot, the problem here appears cos i used a let EmbedHelp = Discord.RichEmbed this problems appears in the Terminal, please type the problem and what i need to fix :
SyntaxError: Lexical declaration cannot appear in a single-statement context
at new Script (vm.js:79:7)
at createScript (vm.js:251:10)
at Object.runInThisContext (vm.js:303:10)
at Module._compile (internal/modules/cjs/loader.js:657:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:283:19)
the code i use for the embed is :
client.on('message', message => {
if (message.startsWith('$Commands'))
let EmbedHelp = Discord.RichEmbed()
title: title ~~(did you know you can have markdown here too?)~~,
description: ```,
url: https://discordapp.com,
color: 192748,
timestamp: Timezone - GGT 3+,
footer: {
icon_url: https://cdn.discordapp.com/avatars/563449221701959700/8386d5fe48d71898c40244e7a5a66d58.png,
text: footer text
},
thumbnail: {
url: https://cdn.discordapp.com/avatars/563449221701959700/8386d5fe48d71898c40244e7a5a66d58.png
},
image: {
url: https://cdn.discordapp.com/embed/avatars/0.png
},
author: {
name: Galak$y#3038,
url: https://discordapp.com,
icon_url: https://discordapp.com/channels/564059839320555540/569179399211974666
},
}
});
channel.send({EmbedHelp})
More From » node.js