Skip to content

Implement searching threads by creator.  #256

@ShreyasAyyengar

Description

@ShreyasAyyengar

Explain your idea.

Discord does not natively support searching forum channels for a post created by a specific user. The discord bot can facilitate doing so because the JDA provides this functionality:

ForumChannel channel = {...} // get the #help channel.
String creatorId = {...} // requested discord user who created a help thread post.
List<ThreadChannel> foundThreads = new ArrayList<>();

for (ThreadChannel threadChannel : channel.getThreadChannels()) {
    if (threadChannel.getOwnerId().equalsIgnoreCase(creatorId)) {
        foundThreads.add(threadChannel);
    }
}

I realise the Discord bot is written in Kotlin, but I wanted to help anyone who wishes to PR this in finding the proper JDA methods.

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions