const GphApiClient = require("giphy-js-sdk-core");
var giphy = GphApiClient ;
exports.run = (bot, message, args, client) => {
giphy.search("gifs", { q: "fail" })
.then(response => {
var totalResponses = response.data.length;
var responseIndex = Math.floor((Math.random() * 10) + 1) % totalResponses;
var responseFinal = response.data[responseIndex]
const embed = new Discord.RichEmbed() // Here is my problem it says 'Discord' is not defined
.setAuthor('x')
.setColor('RANDOM')
.setTimestamp()
.setDescription('')
.setImage(responseFinal.images.fixed_height.url)
message.channel.send(embed)
}
)
}
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: 0
};
exports.help = {
name: 'hug',
description: 'Free Hug!',
usage: 'hug'
};
I need help :c I just started to coding. I dont know what's the error it just says
'Discord' is not defined
If you find the error please dm me on discord. Wanheda#2722
You need to
requirediscord.js:The error is
'Discord' is not defined, which means that Node.js sawDiscordinDiscord.RichEmbedand tried to get its value, but there is no variableDiscord.See ReferenceError: "x" is not defined on MDN.