So this is the code:
const {
Client,
Attachment
} = require('discord.js');
const bot = new Client();
const cheerio = require('cheerio');
const request = require('request');
const token = 'My Token was here uwu';
const PREFIX = '//';
bot.on('ready', () => {
console.log('Oy lad the bot is online!');
bot.user.setActivity('users', { type: 'WATCHING' }).catch(console.error);
})
bot.on('message', message => {
let args = message.content.substring(PREFIX.length).split(" ");
switch (args[0]) {
case 'ping':
message.channel.send('other stuff')
break;
case 'cmds':
const Embed = new Discord.MessageEmbed()
.setColor(0x000000)
.setTitle("Comenzi:")
.setDescription("stuff")
message.channel.send(Embed);
message.channel.send('2.0')
break;
When I run my code, the bot starts but crashes when I type //cmds, with the following error (note that it was just a piece of the code)
const Embed = new Discord.MessageEmbed() ^
ReferenceError: Discord is not defined