Как вы могли понять, JS ругается на константу. Делаю бота для сервера в Дискорде.
const config = require("./config.json"); const client = new Discord.Client("GUILDS"); client.login(config.BOT_TOKEN); var prefix = "!"; client.on("message", function(message){ if (message.author.bot) return; if (!message.content.startWith(prefix)) return; const commandBody = message.content.slice(prefix.length); const args = commandBody.split(' '); const command = args.shift().toLowerCase(); if (command === "ping"){ const timeTaken = Date.now() - message.createdTimestamp; message.reply(`Понг! Задержка бота: ${timeTaken} милисекунд.`) } })