#but when i do this
1 messages · Page 1 of 1 (latest)
hmm
I remember something about this was shitty, can you try guild.members.cache,get(mem.id) in the foreach
hmm
i read a lot, sometimes things get jumbled
its about user/member objects
also how can i sleep in typescript?
its only once tho
you shouldnt assign roles to many people all at once many times right
like
await new Promise((f) => setTimeout(f, 1000 * 3));
this worlk??
yea
i just wanted assignt one role to all people
idk ts 😦
it's like ?role humans __
lemme see if i can dig up my code for it
sure!
well i can dig it up, just need a couple secs xdd
i can't do a get request for every member that's already fetched... ;)
its different objects
guild.members.fetch doesnt give the object you can assign roles to
so you will need to get the id from the cache
which is what the guild.members.cache does
after fetching?
if i remember correclty
async function testing(){
let members = await mainguild.members.fetch()
members.forEach(bmember => {
let member = mainguild.members.cache.get(bmember.id)
member.roles.add(newrole)
})
}```
like a so
ok, will update you
interaction.guild.members.cache?
yeah it works
just need some type hinting...
huh??
then what's a better way?