fedpep
DIAdiscord.js - Imagine a boo! π»
β’Created by fedpep on 10/14/2024 in #djs-questions
How can I get an array of all the posts in a forum?
π thanks
25 replies
DIAdiscord.js - Imagine a boo! π»
β’Created by fedpep on 10/14/2024 in #djs-questions
How can I get an array of all the posts in a forum?
As I said, I need to export in a csv file title, number of reactions and number of comments of all the messages in a forum on Discord
25 replies
DIAdiscord.js - Imagine a boo! π»
β’Created by fedpep on 10/14/2024 in #djs-questions
How can I get an array of all the posts in a forum?
Thank you very much for your help! Definitely not the cleanest code but it does work
25 replies
DIAdiscord.js - Imagine a boo! π»
β’Created by fedpep on 10/14/2024 in #djs-questions
How can I get an array of all the posts in a forum?
Hey @gwapes really sorry about it. Let me explain myself better. With the above code now I am able to fetch all the posts that are in a specific forum.
Now what I need is:
1. the title of every post
2. the number of reactions every post received (with the default tag, which is π )
3. the number of messages that are in that post
From the discussion happened yesterday I understood that now that I have the collection of all the thread, I just need to loop through it and use the
message.fetch(id)
The problem is that since these are threads and not messages in a text channel, I can't understand what is the channel id and the message id I should use25 replies
DIAdiscord.js - Imagine a boo! π»
β’Created by fedpep on 10/14/2024 in #djs-questions
How can I get an array of all the posts in a forum?
Hey, so this is my new code:
and it's working because I can fetch all the threads in the specific forum (this is an excract of the output).
Now I can't get the messages. I tried to use the id and it didn't work
25 replies
DIAdiscord.js - Imagine a boo! π»
β’Created by fedpep on 10/14/2024 in #djs-questions
How can I get an array of all the posts in a forum?
I see there is a fetchedActive and a fetchedArchive
25 replies
DIAdiscord.js - Imagine a boo! π»
β’Created by fedpep on 10/14/2024 in #djs-questions
How can I get an array of all the posts in a forum?
Oh, I think you might be right. One post is showed as βolderβ so I guess itβs archived. Am I right? Is there a way to fetch all the messages (including older one)?
25 replies
DIAdiscord.js - Imagine a boo! π»
β’Created by fedpep on 10/14/2024 in #djs-questions
How can I get an array of all the posts in a forum?
Iβm using a test server and there are 2 posts at the moment
25 replies
DIAdiscord.js - Imagine a boo! π»
β’Created by fedpep on 10/14/2024 in #djs-questions
How can I get an array of all the posts in a forum?
But the collection that I have (see above) s only 1 item and not all the messages
25 replies
DIAdiscord.js - Imagine a boo! π»
β’Created by fedpep on 10/14/2024 in #djs-questions
How can I get an array of all the posts in a forum?
The why is that I used a forum channel on Discord to collect feature requests on a product and now I have to extract everything to a Google Sheet
I was hoping to automate the process as much as possibile via the discord API
In my head I could get the forum ID, get all the posts in it, and then extract the information that I need from each message
25 replies
DIAdiscord.js - Imagine a boo! π»
β’Created by fedpep on 10/14/2024 in #djs-questions
How can I get an array of all the posts in a forum?
Any suggestions on how to do that?
Itβs a new forum (so there are no many messages) and I want to extract them all
25 replies
DIAdiscord.js - Imagine a boo! π»
β’Created by fedpep on 10/14/2024 in #djs-questions
How can I get an array of all the posts in a forum?
Now I get this
I see the last message in the forum but not a list of all the messages
25 replies
DIAdiscord.js - Imagine a boo! π»
β’Created by fedpep on 10/14/2024 in #djs-questions
How can I get an array of all the posts in a forum?
Ok, so I changed the code to this:
And now I get this: Promise { <pending> }
25 replies
DIAdiscord.js - Imagine a boo! π»
β’Created by fedpep on 10/14/2024 in #djs-questions
How can I get an array of all the posts in a forum?
@Qjuh thanks for your answer but I still can't get this to work. I receive an error: TypeError: Cannot read properties of undefined (reading 'fetch')
This is my code:
25 replies
DIAdiscord.js - Imagine a boo! π»
β’Created by fedpep on 9/17/2024 in #djs-questions
awaitMessageComponent doesn't wait the set time
yes, I can finally see "Success" in the console. Thank you very much π
14 replies
DIAdiscord.js - Imagine a boo! π»
β’Created by fedpep on 9/17/2024 in #djs-questions
awaitMessageComponent doesn't wait the set time
Thanks π
14 replies
DIAdiscord.js - Imagine a boo! π»
β’Created by fedpep on 9/17/2024 in #djs-questions
awaitMessageComponent doesn't wait the set time
Ah ok! Something like:
instead of
14 replies
DIAdiscord.js - Imagine a boo! π»
β’Created by fedpep on 9/17/2024 in #djs-questions
awaitMessageComponent doesn't wait the set time
I understand your answer, but I'm still struggling to understand how to modify the code to make it function properly.
14 replies
DIAdiscord.js - Imagine a boo! π»
β’Created by fedpep on 9/17/2024 in #djs-questions
awaitMessageComponent doesn't wait the set time
This is the error:
14 replies