eliteSchwein / mooncord

Moonraker discord Bot
MIT License
133 stars 24 forks source link

Move image path to MessageAttachment from MessageEmbed #167

Closed adelyser closed 2 years ago

adelyser commented 2 years ago

Issue: Broadcast messages were failing and crashing the service due to the following error:

npm[17657]: /home/pi/mooncord/node_modules/discord.js/src/structures/MessageEmbed.js:78
npm[17657]:     this.color = 'color' in data ? Util.resolveColor(data.color) : null;
npm[17657]:                          ^
npm[17657]: TypeError: Cannot use 'in' operator to search for 'color' in /home/pi/mooncord/images/notification.png

Fix: The notification image needs to be passed into MessageAttachment() instead of MessageEmbed().