#channel issue

1 messages · Page 1 of 1 (latest)

steel jetty
#

@terse patrol i believe the issue might be the arg you are passing to fetch?

terse patrol
#

I'm pretty sure the issue is I'm somehow fucking my snowflake when I'm fetching it from the database, and DJS defaults to fetching everything

steel jetty
#

reproducing here for thread

let guild = await client.guilds.cache.get(serverId);
let channel = await guild.channels.fetch(value.channel);
let giveawayMessage = await channel.messages.fetch(value.message);
terse patrol
#

which I didnt realize it was doing before

steel jetty
#

thats what im thinking man

#

but also

#

im not sure what value is

#

any way it must be value.channel.id?

terse patrol
#

no, value is the database entry i fetch, and channel is the row i store the ID in

#

i didnt explain bc i assumed that I had done it correctly since djs didnt throw any errors, but that wasnt the case lol

steel jetty
#

no worries man

#

not to poke at you (ive been there a million times). but when im absolutely certain of something i do a sanity check like that log i suggested

terse patrol
#

yeah I should've, it's just 2 AM and i'm crunching for a deadline :P

#

live and learn ig

steel jetty
#

better to have uncovered this bug than banged your head even more you know

terse patrol
#

yeah exactly

steel jetty
#

i hear you man

terse patrol
#

i rly appreciate ur help dude, ur the most helpful person i've met so far

steel jetty
#

no worries man. i figured id help while waiting for help on my own question lol

#

didnt realize the time either

#

🧟‍♂️

terse patrol
#

have a good night man. i'll go back and check ur question to see if i've seen it before

steel jetty
#

nah dont worry about it i think i solved it actually

#

not sure why the guide sample is broken but thats a different issue. mine was related to TS casting

#

coincedentally coming to this server the first question i saw was someone else stuck on casting. and that led to solving my own. karma baby

terse patrol
#

you love to see it LOL

#

glad that u got it all figured out!