bwuuuuh
Some checks are pending
ptero-push / build (push) Waiting to run

This commit is contained in:
Christopher Cookman 2025-01-12 02:54:21 -07:00
parent d88188182c
commit f763a95472

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) => {