main #21

Open
ChrisChrome wants to merge 44 commits from main into shard-test
Showing only changes of commit f763a95472 - Show all commits

View file

@ -460,14 +460,7 @@ xmpp.on("stanza", (stanza) => {
let channel = discord.channels.cache.get(row.channelid);
if (!channel) return console.log(`${colors.red("[ERROR]")} Channel ${row.channelid} not found`);
if (!channel.permissionsFor(discord.user).has(Discord.PermissionFlagsBits.SendMessages)) {
const logs = await channel.guild.fetchAuditLogs({ type: Discord.AuditLogEvent.BotAdd });
const user = logs.entries.find(entry => entry.target.id === discord.user.id)?.executor;
if (user) {
user.send(`I don't have permission to send messages in the channel ${channel.name} (${channel.id}) in the guild ${channel.guild.name} (${channel.guild.id}). Please update my permissions.`);
}
return;
}
// fetch the product text
trySend = () => {
fetch(`https://mesonet.agron.iastate.edu/api/1/nwstext/${product_id_raw}`).then((res) => {