forked from ChrisChrome/weather-bot
Bwuh
This commit is contained in:
parent
8b94e7e3f8
commit
d88188182c
2
index.js
2
index.js
|
@ -460,7 +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("SEND_MESSAGES")) {
|
||||
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) {
|
||||
|
|
Loading…
Reference in a new issue