Auto Crosspost

This commit is contained in:
Christopher Cookman 2025-09-28 23:55:29 -06:00
parent f89857a499
commit 911b3aac8e

View file

@ -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);
})
});
}