@gamam00

Как исправить ошибку в дс боте?

Код
let i1;
i1 = 'Guilds';
let i2;
i2 = 'GuildMessages';
let i3;
i3 = 'MessageContent';







const { AttachmentBuilder, Client, EmbedBuilder } = require('discord.js')
const file = new AttachmentBuilder('../assets/discordjs.png');
const exampleEmbed = new EmbedBuilder()
    .setTitle('Some title')
    .setImage('attachment://discordjs.png');

channel.send({
    content: 'This is an embed',
    embeds: [file]
});

channel.send({ embeds: [exampleEmbed] });
const client = new Client({ intents: [i1, i2, i3] });
let config = require('./config.json'); 
let token = config.token; 
let prefix = config.prefix;
client.login(token);
client.on("ready", function () {
    console.log(client.user.username + " запустился!")
        client.on('messageCreate', message => {
			if (exampleEmbed.setColor(0x7289DA)) {
				
        }
    });
})


Ошибка
channel.send({
^

ReferenceError: channel is not defined
  • Вопрос задан
  • 87 просмотров
Пригласить эксперта
Ваш ответ на вопрос

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

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