function Notification() {
if (queueData.place <= "500") {
msg.channel.send({
embed: {
color: 3447003,
author: {
name: client.user.username,
icon_url: client.user.avatarURL
},
title: "2bored2wait discord bridge",
//url: "http://google.com",
description: "Your being pinged",
fields: [{
name: "Position",
value: `@everyone You're below position **${queueData.place}**.`
},
{
name: "ETA",
value: `Estimated time until login: **${queueData.ETA}**`
}
],
timestamp: new Date(),
footer: {
icon_url: client.user.avatarURL,
text: "Author: Surprisejedi"
}
}
});
}
}
所以我用这段代码来做一个系统,在不和时通知我,因为这是一个不和的机器人,当我低于位置30时,我现在用500作为占位符。
discord controlled bot文件的Pastebin:https://Pastebin.com/zife7zxt我的错误是:
SyntaxError: Unexpected end of input
[90m at wrapSafe (internal/modules/cjs/loader.js:1053:16)[39m
[90m at Module._compile (internal/modules/cjs/loader.js:1101:27)[39m
[90m at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)[39m
[90m at Module.load (internal/modules/cjs/loader.js:985:32)[39m
[90m at Function.Module._load (internal/modules/cjs/loader.js:878:14)[39m
[90m at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)[39m
[90m at internal/main/run_main_module.js:17:47[39m" ```
尝试“转义”fields数组中Everyone Yous\re
中的单引号字符。