diff --git a/interactions/commands/add.js b/interactions/commands/add.js index 6908250..c99f14a 100644 --- a/interactions/commands/add.js +++ b/interactions/commands/add.js @@ -1,6 +1,7 @@ const fs = require('fs'); const path = require('path'); const https = require('https'); +const Discord = require('discord.js'); const execute = async (interaction, db, client) => { if (!interaction.isCommand()) return; @@ -80,7 +81,11 @@ const execute = async (interaction, db, client) => { attachment: path.join(__dirname, '../../storage', file), name: file })) - }).catch(console.error); + }).then(msg => { + if (msg.channel.type == Discord.ChannelType.GuildAnnouncement) { + msg.crosspost().catch(console.error); // Try crosspost lol + } + }).catch(console.error); }) }); }