Z_runner
Z_runner
DIAdiscord.js - Imagine an app
Created by Z_runner on 7/17/2023 in #djs-questions
`Cannot read properties of undefined (reading 'send')` when fetching guild members
I think I got it all working, thanks a really lot for your help!
61 replies
DIAdiscord.js - Imagine an app
Created by Z_runner on 7/17/2023 in #djs-questions
`Cannot read properties of undefined (reading 'send')` when fetching guild members
I mean, this + making getClient() async
61 replies
DIAdiscord.js - Imagine an app
Created by Z_runner on 7/17/2023 in #djs-questions
`Cannot read properties of undefined (reading 'send')` when fetching guild members
it's probably my best option for sure
61 replies
DIAdiscord.js - Imagine an app
Created by Z_runner on 7/17/2023 in #djs-questions
`Cannot read properties of undefined (reading 'send')` when fetching guild members
and I would have to keep track somewhere of which guilds members list were fetched, I don't think d.js can handle that, right?
61 replies
DIAdiscord.js - Imagine an app
Created by Z_runner on 7/17/2023 in #djs-questions
`Cannot read properties of undefined (reading 'send')` when fetching guild members
yeah that could work
61 replies
DIAdiscord.js - Imagine an app
Created by Z_runner on 7/17/2023 in #djs-questions
`Cannot read properties of undefined (reading 'send')` when fetching guild members
and the WS connection will still keep track of every member joining and leaving the cached guilds?
61 replies
DIAdiscord.js - Imagine an app
Created by Z_runner on 7/17/2023 in #djs-questions
`Cannot read properties of undefined (reading 'send')` when fetching guild members
I've just checked, I have 29,127 rows rn
61 replies
DIAdiscord.js - Imagine an app
Created by Z_runner on 7/17/2023 in #djs-questions
`Cannot read properties of undefined (reading 'send')` when fetching guild members
even with a pagination system that'd still be a lot
61 replies
DIAdiscord.js - Imagine an app
Created by Z_runner on 7/17/2023 in #djs-questions
`Cannot read properties of undefined (reading 'send')` when fetching guild members
yeah but my table contains a few thousands of people, wouldn't that mean making thousands of requests at once?
61 replies
DIAdiscord.js - Imagine an app
Created by Z_runner on 7/17/2023 in #djs-questions
`Cannot read properties of undefined (reading 'send')` when fetching guild members
to be extra clear, I have 2 instances of my bot running. One is the regular bot with commands and all, the second is this API
61 replies
DIAdiscord.js - Imagine an app
Created by Z_runner on 7/17/2023 in #djs-questions
`Cannot read properties of undefined (reading 'send')` when fetching guild members
one other way would be to store in another table in which guilds each participant is, but... I'm not sure if that's actually smarter lol
61 replies
DIAdiscord.js - Imagine an app
Created by Z_runner on 7/17/2023 in #djs-questions
`Cannot read properties of undefined (reading 'send')` when fetching guild members
until it didn't
61 replies
DIAdiscord.js - Imagine an app
Created by Z_runner on 7/17/2023 in #djs-questions
`Cannot read properties of undefined (reading 'send')` when fetching guild members
my current use case is for a kind of leaderboard I have in my database a large leaderboard table containing one row for each "participant", but guilds are all mixed in there and I need to return the list of participants in a specific guild so my idea was to get the member IDs, pass it into my SQL query to filter the table, and boom everything works fine
61 replies
DIAdiscord.js - Imagine an app
Created by Z_runner on 7/17/2023 in #djs-questions
`Cannot read properties of undefined (reading 'send')` when fetching guild members
feels like my brain isn't working properly at 11:50pm, I should probably go to sleep and try again tomorrow
61 replies
DIAdiscord.js - Imagine an app
Created by Z_runner on 7/17/2023 in #djs-questions
`Cannot read properties of undefined (reading 'send')` when fetching guild members
yeah no, that would be stupid, sorry. They already have an endpoint to fetch members, why bother with only a subset result
61 replies
DIAdiscord.js - Imagine an app
Created by Z_runner on 7/17/2023 in #djs-questions
`Cannot read properties of undefined (reading 'send')` when fetching guild members
I wonder if discord has an endpoint for that - probably not tbh
61 replies
DIAdiscord.js - Imagine an app
Created by Z_runner on 7/17/2023 in #djs-questions
`Cannot read properties of undefined (reading 'send')` when fetching guild members
now if you have an idea about returning the full list of member IDs without fetching them all each time, I'd be glad to hear it ^^
61 replies
DIAdiscord.js - Imagine an app
Created by Z_runner on 7/17/2023 in #djs-questions
`Cannot read properties of undefined (reading 'send')` when fetching guild members
61 replies
DIAdiscord.js - Imagine an app
Created by Z_runner on 7/17/2023 in #djs-questions
`Cannot read properties of undefined (reading 'send')` when fetching guild members
but eh, I'd like to actually avoid fetching, I don't know why I decided to fetch the guild tbh
61 replies
DIAdiscord.js - Imagine an app
Created by Z_runner on 7/17/2023 in #djs-questions
`Cannot read properties of undefined (reading 'send')` when fetching guild members
lol true
61 replies