-fishon?
DIAdiscord.js - Imagine an app
•Created by -fishon? on 3/31/2025 in #djs-questions
why are video_quality_mode and rtc_region missing in auditLogEntry.changes keys?
const event: Event<Events.GuildAuditLogEntryCreate> = {
name: Events.GuildAuditLogEntryCreate,
async execute(auditLogEntry, guild) {
if (auditLogEntry.action !== AuditLogEvent.ChannelUpdate) return
for (const { key, old, new: newValue } of auditLogEntry.changes) {
// @ts-ignore
else if (key === 'video_quality_mode') //
// @ts-ignore
else if (key === 'rtc_region') //
}
};
const event: Event<Events.GuildAuditLogEntryCreate> = {
name: Events.GuildAuditLogEntryCreate,
async execute(auditLogEntry, guild) {
if (auditLogEntry.action !== AuditLogEvent.ChannelUpdate) return
for (const { key, old, new: newValue } of auditLogEntry.changes) {
// @ts-ignore
else if (key === 'video_quality_mode') //
// @ts-ignore
else if (key === 'rtc_region') //
}
};
5 replies
DIAdiscord.js - Imagine an app
•Created by -fishon? on 3/25/2025 in #djs-questions
PermissionOverwrites Why did this stop working?
if (auditLogEntry.action !== AuditLogEvent.ChannelOverwriteDelete) return;
const changes = auditLogEntry.changes
const target = await guild.channels.fetch(auditLogEntry.targetId).catch(() => null)
const overwriteId = auditLogEntry.changes.find(change => change.key === 'id')?.old;
const type = auditLogEntry.changes.find(change => change.key === 'type')?.old;
const allow = auditLogEntry.changes.find(change => change.key === 'allow')?.old;
const deny = auditLogEntry.changes.find(change => change.key === 'deny')?.old;
await target.permissionOverwrites.create(overwriteId, {
type,
allow: BigInt(allow),
deny: BigInt(deny),
});
if (auditLogEntry.action !== AuditLogEvent.ChannelOverwriteDelete) return;
const changes = auditLogEntry.changes
const target = await guild.channels.fetch(auditLogEntry.targetId).catch(() => null)
const overwriteId = auditLogEntry.changes.find(change => change.key === 'id')?.old;
const type = auditLogEntry.changes.find(change => change.key === 'type')?.old;
const allow = auditLogEntry.changes.find(change => change.key === 'allow')?.old;
const deny = auditLogEntry.changes.find(change => change.key === 'deny')?.old;
await target.permissionOverwrites.create(overwriteId, {
type,
allow: BigInt(allow),
deny: BigInt(deny),
});
66 replies