-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement searching threads by creator. #256
Comments
i mean whats the point |
anyways this is the code in kotlin val helpChannel: ForumChannel = guild.getChannelById(1234)
val creatorID = userId
val threads: MutableList<ThreadChannel> = mutableListOf()
for (thread in helpChannel.threadChannels) {
if (thread.ownerId.equals(creatorID)) {
threads.add(thread)
}
} |
"support searching forum channels for a post created by a specific user." |
i mean i guess i could make a pr later I'm bored anyways |
so how should we make this work, like have three per page and have a button that changes pages or just the top 5 recent |
I personally think that having it three per page with a button to change pages would be a nicer addition. You're the one PRing it though, so up to you |
Here's the code in Kotlin but easier and uses our existing utils: Server.helpChannel.threadChannels.filter { it.ownerId == userId } I also think 5 per page, in line with the /reputation command would be nice and consistent. |
Yeah I didn't look at any of the codebase I was just changing their code into kotlin, but that'll help actually I don't need to create a new postregistry method then |
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:
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
The text was updated successfully, but these errors were encountered: