B4J Question [JDA] Retrieve Archived Public Thread Channels?

Magma

Expert
Licensed User
Longtime User
Today found time, to play with JDA Discord API Library wrapper created by @DonManfred

I have to say with simple words, that is perfect!


I ve managed to show all channels, threads i have at my discord server... with this code:
B4X:
Sub ListAllChannelsAndThreads(chan As MessageChannel)
    Dim guilds As List = jda.Guilds

    For Each gw As Guild In guilds
        SendMessage(chan,$"Guild: ${gw.Name} (ID: ${gw.Id})"$)
        
'        ' All guild channels
        Dim chans As List = gw.GuildChannels
        For Each ch As GuildChannel In chans
            SendMessage(chan,$"  Channel: ${ch.name} [${ch.ID}] Type: ${ch.Type}"$)
        Next
        
        ' All active threads at guild
        Dim threads As List = gw.ThreadChannels  ' List of ThreadChannelwrapper
        For Each th As ThreadChannel In threads
            SendMessage(chan,$"  Thread: ${th.Name} [${th.ID}] Parent: ${th.ParentChannel}"$)
        Next
    Next
End Sub

But as I am saying at forum thread title can;t Retrieve Archived Public Thread Channels..

Anyone can do that ?

My wish... is take all my messages (or from specific user, or from all) and save them in sqlite database. I have answers that i wanted to use in a huge FAQ. Also this can help me create an AI Chat bot for my webpages.
 

DonManfred

Expert
Licensed User
Longtime User
I can´t remember seeing any such method.

You can check the JDA-Docs if you find such a method. If it is there i can help adding it to the wrapper.

The only i know is that you can use jda_onThreadHidden event to get informed when a thread is archived and just remember that.
 
Upvote 0

Magma

Expert
Licensed User
Longtime User
I can´t remember seeing any such method.

You can check the JDA-Docs if you find such a method. If it is there i can help adding it to the wrapper.

The only i know is that you can use jda_onThreadHidden event to get informed when a thread is archived and just remember that.
Hi there ...


Searching JDA docs found:
retrieveArchivedPublicThreadChannels
retrieveArchivedPrivateThreadChannels
retrieveArchivedPrivateJoinedThreadChannels
retrievePast for messages
*history* for messages

As I understand those are commands that may be require some extra events...

Can I somehow use them with javaobject on your lib wrapper ?

Thanks in advance
 
Upvote 0
Top