Deca
Deca
DIAdiscord.js - Imagine an app
Created by Dokter on 7/15/2023 in #djs-questions
user undefined
👍
39 replies
DIAdiscord.js - Imagine an app
Created by Dokter on 7/15/2023 in #djs-questions
user undefined
yes
39 replies
DIAdiscord.js - Imagine an app
Created by Dokter on 7/15/2023 in #djs-questions
user undefined
interaction.client.guilds.cache.get(interaction.guildId);
interaction.client.guilds.cache.get(interaction.guildId);
39 replies
DIAdiscord.js - Imagine an app
Created by Dokter on 7/15/2023 in #djs-questions
user undefined
I mean
39 replies
DIAdiscord.js - Imagine an app
Created by Dokter on 7/15/2023 in #djs-questions
user undefined
yeah but I believe this works with interaction.client too.
// It's a function declared in the same file where the `client` is
getUser: (guildId: string, userId: string) => {
let guild = client.guilds.cache.get(guildId);
let member = guild?.members.cache.get(userId);

return member;
},
// It's a function declared in the same file where the `client` is
getUser: (guildId: string, userId: string) => {
let guild = client.guilds.cache.get(guildId);
let member = guild?.members.cache.get(userId);

return member;
},
39 replies
DIAdiscord.js - Imagine an app
Created by Dokter on 7/15/2023 in #djs-questions
user undefined
yeah I think that makes sense thanks
39 replies
DIAdiscord.js - Imagine an app
Created by Dokter on 7/15/2023 in #djs-questions
user undefined
Not related but Can I do something like this when some of functions are not in interaction?
getClient: () => {
return client;
},
getUser: (guildId: string, userId: string) => {
let guild = client.guilds.cache.get(guildId);
let member = guild?.members.cache.get(userId);

return member;
},
getClient: () => {
return client;
},
getUser: (guildId: string, userId: string) => {
let guild = client.guilds.cache.get(guildId);
let member = guild?.members.cache.get(userId);

return member;
},
39 replies
DIAdiscord.js - Imagine an app
Created by Dokter on 7/15/2023 in #djs-questions
user undefined
You could also do something else if there's no client user found
39 replies
DIAdiscord.js - Imagine an app
Created by Dokter on 7/15/2023 in #djs-questions
user undefined
I think I misunderstood the question
39 replies
DIAdiscord.js - Imagine an app
Created by Dokter on 7/15/2023 in #djs-questions
user undefined
oh sorry
39 replies
DIAdiscord.js - Imagine an app
Created by Dokter on 7/15/2023 in #djs-questions
user undefined
39 replies
DIAdiscord.js - Imagine an app
Created by Dokter on 7/15/2023 in #djs-questions
user undefined
I think I used interaction.user.
39 replies