main #21

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

View file

@ -460,7 +460,7 @@ xmpp.on("stanza", (stanza) => {
let channel = discord.channels.cache.get(row.channelid); let channel = discord.channels.cache.get(row.channelid);
if (!channel) return console.log(`${colors.red("[ERROR]")} Channel ${row.channelid} not found`); if (!channel) return console.log(`${colors.red("[ERROR]")} Channel ${row.channelid} not found`);
if (!channel.permissionsFor(discord.user).has("SEND_MESSAGES")) { if (!channel.permissionsFor(discord.user).has(Discord.PermissionFlagsBits.SendMessages)) {
const logs = await channel.guild.fetchAuditLogs({ type: Discord.AuditLogEvent.BotAdd }); const logs = await channel.guild.fetchAuditLogs({ type: Discord.AuditLogEvent.BotAdd });
const user = logs.entries.find(entry => entry.target.id === discord.user.id)?.executor; const user = logs.entries.find(entry => entry.target.id === discord.user.id)?.executor;
if (user) { if (user) {