client.on("roleCreate", async(role: Role) => {
const auditLogEntry =
(await role.guild.fetchAuditLogs({
type: AuditLogEvent.RoleCreate,
}))
.entries.find((v) => v.targetId == role.id);
// Will auditLogEntry exist or theres a chance the entry hasn't been created yet?
});
client.on("roleCreate", async(role: Role) => {
const auditLogEntry =
(await role.guild.fetchAuditLogs({
type: AuditLogEvent.RoleCreate,
}))
.entries.find((v) => v.targetId == role.id);
// Will auditLogEntry exist or theres a chance the entry hasn't been created yet?
});