forked from Supositware/Haha-Yes
Fix errors that could occur
This commit is contained in:
parent
56768640ac
commit
5cb52fb371
2 changed files with 5 additions and 5 deletions
|
@ -87,10 +87,10 @@ export default {
|
||||||
// If the message doesn't have embeds assume it got deleted so don't do anything
|
// If the message doesn't have embeds assume it got deleted so don't do anything
|
||||||
if (!message) return;
|
if (!message) return;
|
||||||
|
|
||||||
// If the original embed description is empty make this embed empty ( and not undefined )
|
// If the original embed description is empty make this embed null ( and not empty )
|
||||||
let description = message.embeds[0].description;
|
let description = message.embeds[0].description;
|
||||||
if (!message.embeds[0].description || message.embeds[0].description == undefined) {
|
if (!message.embeds[0].description || message.embeds[0].description == undefined) {
|
||||||
description = '';
|
description = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Embed = new EmbedBuilder()
|
const Embed = new EmbedBuilder()
|
||||||
|
@ -132,7 +132,7 @@ export default {
|
||||||
|
|
||||||
if (reaction.message.guild.emojis.resolve(emote)) Embed.setFooter(reactionCount, reaction.message.guild.emojis.resolve(emote).url);
|
if (reaction.message.guild.emojis.resolve(emote)) Embed.setFooter(reactionCount, reaction.message.guild.emojis.resolve(emote).url);
|
||||||
|
|
||||||
let description = '';
|
let description = null;
|
||||||
|
|
||||||
if (reaction.message.embeds[0]) {
|
if (reaction.message.embeds[0]) {
|
||||||
if (reaction.message.embeds[0].type == 'image') {
|
if (reaction.message.embeds[0].type == 'image') {
|
||||||
|
|
|
@ -95,10 +95,10 @@ export default {
|
||||||
// If the message doesn't have embeds assume it got deleted so don't do anything
|
// If the message doesn't have embeds assume it got deleted so don't do anything
|
||||||
if (!message) return;
|
if (!message) return;
|
||||||
|
|
||||||
// If the original embed description is empty make this embed empty ( and not undefined )
|
// If the original embed description is empty make this embed null ( and not empty )
|
||||||
let description = message.embeds[0].description;
|
let description = message.embeds[0].description;
|
||||||
if (!message.embeds[0].description || message.embeds[0].description == undefined) {
|
if (!message.embeds[0].description || message.embeds[0].description == undefined) {
|
||||||
description = '';
|
description = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Embed = new EmbedBuilder()
|
const Embed = new EmbedBuilder()
|
||||||
|
|
Loading…
Reference in a new issue