AuditLogEvent.ChannelUpdate getting logs for only 1 channel and not all channels

const guild_channel_update_audit_logs = await new_channel.guild.fetchAuditLogs({ type: AuditLogEvent.ChannelUpdate, limit: 1 });
const guild_channel_update_audit_logs = await new_channel.guild.fetchAuditLogs({ type: AuditLogEvent.ChannelUpdate, limit: 1 });
If I have two TextChannels called secret and secret2, why does the above code only get the logs for secret and not also secret2? Is this suppose to happen?
3 Replies
d.js toolkit
d.js toolkit3w ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by staff
monbrey
monbrey3w ago
Does your bot have the necessary permissions for secret2?
aw0k3n
aw0k3nOP3w ago
Yes, it has Administrator permissions but I fixed it. Instead of using ChannelUpdate, I used ChannelOverwriteUpdate and it worked. Thanks for replying though.
Want results from more Discord servers?
Add your server