@nastilove92

Не могу понять в чем ошибка. бот не запускается?

Код:

// Require the necessary discord.js classes
const { Client, GatewayIntentBits, Events } = require("discord.js");
const { token } = require("./config.json");

// Create a new client instance
const client = new Client({ intents: [GatewayIntentBits.Guilds] });

// When the client is ready, run this code (only once).
// The distinction between `client: Client` and `readyClient: Client` is important for TypeScript developers.
// It makes some properties non-nullable.
client.once(Events.ClientReady, readyClient => {
console.log(`Ready! Logged in as ${readyClient.user.tag}`);
});

// Log in to Discord with your client's token
client.login("...");


Ошибка:

ReferenceError: Intents is not defined
  • Вопрос задан
  • 112 просмотров
Пригласить эксперта
Ответы на вопрос 1
Mike_Ro
@Mike_Ro
Python, JS, WordPress, SEO, Bots, Adversting
Переменная Intens не объявлена. https://stackoverflow.com/questions/68972291/disco...
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы