Emily
Emily
DIAdiscord.js - Imagine an app
Created by Discreet on 7/19/2023 in #djs-questions
Making empheral embeds
sometimes you just need another pair of eyes haha YaePray
11 replies
DIAdiscord.js - Imagine an app
Created by Discreet on 7/19/2023 in #djs-questions
Making empheral embeds
{ ephemeral: true }
{ ephemeral: true }
11 replies
DIAdiscord.js - Imagine an app
Created by Discreet on 7/19/2023 in #djs-questions
Making empheral embeds
I think you spelt it wrong
11 replies
DIAdiscord.js - Imagine an app
Created by Emily on 7/19/2023 in #djs-questions
GuildMemberUpdate's oldMember doesn't have correct roles.
alright perfect thanks a lot dorime
46 replies
DIAdiscord.js - Imagine an app
Created by Emily on 7/19/2023 in #djs-questions
GuildMemberUpdate's oldMember doesn't have correct roles.
client.guilds.resolve(process.env.DISCORD_GUILD_ID).members.fetch();
//and
client.guilds.cache.get(process.env.DISCORD_GUILD_ID).members.fetch();
client.guilds.resolve(process.env.DISCORD_GUILD_ID).members.fetch();
//and
client.guilds.cache.get(process.env.DISCORD_GUILD_ID).members.fetch();
46 replies
DIAdiscord.js - Imagine an app
Created by Emily on 7/19/2023 in #djs-questions
GuildMemberUpdate's oldMember doesn't have correct roles.
so there's no like real difference between the two
46 replies
DIAdiscord.js - Imagine an app
Created by Emily on 7/19/2023 in #djs-questions
GuildMemberUpdate's oldMember doesn't have correct roles.
ooooooh I think i see what you mean
46 replies
DIAdiscord.js - Imagine an app
Created by Emily on 7/19/2023 in #djs-questions
GuildMemberUpdate's oldMember doesn't have correct roles.
I'm just trying to work out the specific difference between
client.guilds.resolve(process.env.DISCORD_GUILD_ID).members.fetch();
//and
client.guilds.cache.get();
client.guilds.resolve(process.env.DISCORD_GUILD_ID).members.fetch();
//and
client.guilds.cache.get();
which I think was your other example
46 replies
DIAdiscord.js - Imagine an app
Created by Emily on 7/19/2023 in #djs-questions
GuildMemberUpdate's oldMember doesn't have correct roles.
and not just members in the specific guild like my example
46 replies
DIAdiscord.js - Imagine an app
Created by Emily on 7/19/2023 in #djs-questions
GuildMemberUpdate's oldMember doesn't have correct roles.
yeah that's what im saying. I'm asking if your example will cache all guilds the bot is in
46 replies
DIAdiscord.js - Imagine an app
Created by Emily on 7/19/2023 in #djs-questions
GuildMemberUpdate's oldMember doesn't have correct roles.
that would cache all guild information (including members) for all guilds the bot is a member of, as opposed to what I did which will cache specifically only members in that specific guild?
46 replies
DIAdiscord.js - Imagine an app
Created by Emily on 7/19/2023 in #djs-questions
GuildMemberUpdate's oldMember doesn't have correct roles.
const { Events } = require('discord.js');
require('dotenv').config();

module.exports = {
name: Events.ClientReady,
once: true,
async execute(client) {
await client.guilds.resolve(process.env.DISCORD_GUILD_ID).members.fetch();
console.log(`Ready! Logged in as ${client.user.tag}`);
},
};
const { Events } = require('discord.js');
require('dotenv').config();

module.exports = {
name: Events.ClientReady,
once: true,
async execute(client) {
await client.guilds.resolve(process.env.DISCORD_GUILD_ID).members.fetch();
console.log(`Ready! Logged in as ${client.user.tag}`);
},
};
could you just sanity check this solution and I'll mark it as resolved
46 replies
DIAdiscord.js - Imagine an app
Created by Emily on 7/19/2023 in #djs-questions
GuildMemberUpdate's oldMember doesn't have correct roles.
I understand that but the strategy of caching every user when the bot starts might become too cumbersome
46 replies
DIAdiscord.js - Imagine an app
Created by Emily on 7/19/2023 in #djs-questions
GuildMemberUpdate's oldMember doesn't have correct roles.
its currently at ~7000
46 replies
DIAdiscord.js - Imagine an app
Created by Emily on 7/19/2023 in #djs-questions
GuildMemberUpdate's oldMember doesn't have correct roles.
Perfect! How many members do you think the bot would have to oversee for this strategy to not work anymore?
46 replies
DIAdiscord.js - Imagine an app
Created by Emily on 7/19/2023 in #djs-questions
GuildMemberUpdate's oldMember doesn't have correct roles.
The server has several thousand people in it so would this be efficient?
46 replies
DIAdiscord.js - Imagine an app
Created by Emily on 7/19/2023 in #djs-questions
GuildMemberUpdate's oldMember doesn't have correct roles.
How would you suggest that I cache all the guild members on the server? Should I do that in my on(Events.ClientReady), or is there another smart way to do that?
46 replies
DIAdiscord.js - Imagine an app
Created by Emily on 7/19/2023 in #djs-questions
GuildMemberUpdate's oldMember doesn't have correct roles.
46 replies