Frosty
Frosty
DIAdiscord.js - Imagine an app
Created by Frosty on 11/1/2023 in #djs-questions
Getting the executor from Audit Logs
But could i do something like this:
let botRoleIs = newMember.roles.botRole
let botAllRoles = newMember.roles.cache
let botRoleIs = newMember.roles.botRole
let botAllRoles = newMember.roles.cache
So now i filter from botAllRoles and then i remove the rest?
33 replies
DIAdiscord.js - Imagine an app
Created by Frosty on 11/1/2023 in #djs-questions
Getting the executor from Audit Logs
So when i'd like my bot, to remove another bots all roles expect the bot's own role, how shall i do it?
33 replies
DIAdiscord.js - Imagine an app
Created by Frosty on 11/1/2023 in #djs-questions
Getting the executor from Audit Logs
So how do i define the bot's own role in the guild?, with the .me?
33 replies
DIAdiscord.js - Imagine an app
Created by Frosty on 11/1/2023 in #djs-questions
Getting the executor from Audit Logs
If i wanna remove all bot's roles expect their own bot role coz das impossible, how can i do that?
33 replies
DIAdiscord.js - Imagine an app
Created by Frosty on 11/1/2023 in #djs-questions
Getting the executor from Audit Logs
Also 1 more question hehe
33 replies
DIAdiscord.js - Imagine an app
Created by Frosty on 11/1/2023 in #djs-questions
Getting the executor from Audit Logs
Thanks
33 replies
DIAdiscord.js - Imagine an app
Created by Frosty on 11/1/2023 in #djs-questions
Getting the executor from Audit Logs
I got that yeah
33 replies
DIAdiscord.js - Imagine an app
Created by Frosty on 11/1/2023 in #djs-questions
Getting the executor from Audit Logs
Oki 🙂
33 replies
DIAdiscord.js - Imagine an app
Created by Frosty on 11/1/2023 in #djs-questions
Getting the executor from Audit Logs
What i ment is that, guildMemberUpdate event also gets triggered when someone updates somoenes name right? I only want to go through when the evnt is triggered and a ROLE is given
33 replies
DIAdiscord.js - Imagine an app
Created by Frosty on 11/1/2023 in #djs-questions
Getting the executor from Audit Logs
But if i have it in the guildMemberUpdate event, then if i only want the role updates i can do
if(!fetchedLogs) return;
if(!fetchedLogs) return;
?
33 replies
DIAdiscord.js - Imagine an app
Created by Frosty on 11/1/2023 in #djs-questions
Getting the executor from Audit Logs
Also, the MemebrRoleUpdate only executes when someone is chaging ROLEs on user, nothing else, right?
33 replies
DIAdiscord.js - Imagine an app
Created by Frosty on 11/1/2023 in #djs-questions
Getting the executor from Audit Logs
Coz right now it only works whenever i give someone a role, when removed, then it does nothing.,
33 replies
DIAdiscord.js - Imagine an app
Created by Frosty on 11/1/2023 in #djs-questions
Getting the executor from Audit Logs
1 other question, the MemberRoleUpdate works only when i give a role, or does it also work when i remove a role?
33 replies
DIAdiscord.js - Imagine an app
Created by Frosty on 11/1/2023 in #djs-questions
Getting the executor from Audit Logs
So it should be
const offender = fetchedLogs.entries.first();
const executor = await newMember.guild.members.fetch(offender.executorId);
const offender = fetchedLogs.entries.first();
const executor = await newMember.guild.members.fetch(offender.executorId);
33 replies
DIAdiscord.js - Imagine an app
Created by Frosty on 11/1/2023 in #djs-questions
Getting the executor from Audit Logs
So i made the change, but now my code is:
const fetchedLogs = await oldMember.guild.fetchAuditLogs({
limit: 1,
type: AuditLogEvent.MemberRoleUpdate,
});

const offender = fetchedLogs.entries.first();
const executor = await newMember.guild.members.fetch(offender.id);
const fetchedLogs = await oldMember.guild.fetchAuditLogs({
limit: 1,
type: AuditLogEvent.MemberRoleUpdate,
});

const offender = fetchedLogs.entries.first();
const executor = await newMember.guild.members.fetch(offender.id);
But it cannot find the user using the ID
33 replies
DIAdiscord.js - Imagine an app
Created by Frosty on 11/1/2023 in #djs-questions
Getting the executor from Audit Logs
Oh, i will try again it tomorrow! I was checking docs and only found MemberUpdate
33 replies
DIAdiscord.js - Imagine an app
Created by Frosty on 7/22/2022 in #djs-questions
Leaderboard problem
So how could i do that?
13 replies
DIAdiscord.js - Imagine an app
Created by Frosty on 7/22/2022 in #djs-questions
Leaderboard problem
@squiddleton
13 replies
DIAdiscord.js - Imagine an app
Created by Frosty on 7/22/2022 in #djs-questions
Leaderboard problem
let allMembers = correctServer.members.fetch()
let membersHat = await allMembers.filter(
(member) =>
member.nickname && member.nickname.toLowerCase().includes("🎩") ||
member.username && member.username.toLowerCase().includes("🎩")
);
let allMembers = correctServer.members.fetch()
let membersHat = await allMembers.filter(
(member) =>
member.nickname && member.nickname.toLowerCase().includes("🎩") ||
member.username && member.username.toLowerCase().includes("🎩")
);
so somthing like dis?
13 replies
DIAdiscord.js - Imagine an app
Created by Frosty on 7/22/2022 in #djs-questions
Leaderboard problem
But am i not caching all correctServer members @squiddleton
13 replies