Skip to content
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

Allow modifying GuildOnboarding #819

Merged
merged 1 commit into from
Sep 17, 2023
Merged

Conversation

lukellmann
Copy link
Member

@lukellmann lukellmann commented Apr 20, 2023

The DSL looks like this:

val onboarding = guild.editOnboarding {
    enabled = true
    mode = OnboardingMode.Advanced
    defaultChannelId(channelId1)
    defaultChannelId(channelId2)
    defaultChannelId(channelId3)
    defaultChannelId(channelId4)
    defaultChannelId(channelId5)
    defaultChannelId(channelId6)
    defaultChannelId(channelId7)
    prompt(
        OnboardingPromptType.MultipleChoice,
        title = "prompt title",
        singleSelect = false,
        required = false,
        inOnboarding = true,
    ) {
        option(title = "option 1 title") {
            channelIds += someChannelId
            description = "option 1 description"
        }
        option(title = "option 2 title") {
            roleIds += someRoleId
        }
    }
}
println(onboarding)

See discord/discord-api-docs#6101

@lukellmann lukellmann force-pushed the feature/onboarding-updates branch 2 times, most recently from bba6e0c to b998829 Compare April 23, 2023 14:16
@lukellmann lukellmann changed the base branch from 0.9.x to main June 17, 2023 13:53
@lukellmann lukellmann force-pushed the feature/onboarding-updates branch 2 times, most recently from 6760738 to 276c253 Compare September 3, 2023 23:46
@lukellmann lukellmann changed the title Onboarding updates Allow modifying GuildOnboarding Sep 17, 2023
The DSL looks like this:
val onboarding = guild.editOnboarding {
    enabled = true
    mode = OnboardingMode.Advanced
    defaultChannelId(channelId1)
    defaultChannelId(channelId2)
    defaultChannelId(channelId3)
    defaultChannelId(channelId4)
    defaultChannelId(channelId5)
    defaultChannelId(channelId6)
    defaultChannelId(channelId7)
    prompt(
        OnboardingPromptType.MultipleChoice,
        title = "prompt title",
        singleSelect = false,
        required = false,
        inOnboarding = true,
    ) {
        option(title = "option 1 title") {
            channelIds += someChannelId
            description = "option 1 description"
        }
        option(title = "option 2 title") {
            roleIds += someRoleId
        }
    }
}
println(onboarding)

See discord/discord-api-docs#6101
@lukellmann lukellmann marked this pull request as ready for review September 17, 2023 20:53
@lukellmann lukellmann merged commit 9a7b302 into main Sep 17, 2023
6 checks passed
@lukellmann lukellmann deleted the feature/onboarding-updates branch September 17, 2023 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant