From 13556b69785e4af6d26c6e41259e4829ac1c6f52 Mon Sep 17 00:00:00 2001 From: Aura Date: Sun, 22 Sep 2024 16:40:06 +0200 Subject: [PATCH] feat: add integration types (#266) --- src/commands/choice.ts | 3 ++- src/commands/color.ts | 3 ++- src/commands/content.ts | 4 +++- src/commands/convert.ts | 3 ++- src/commands/create-emoji.ts | 2 ++ src/commands/dictionary.ts | 3 ++- src/commands/emoji.ts | 3 ++- src/commands/manage-tag.ts | 3 ++- src/commands/poll.ts | 3 ++- src/commands/price.ts | 3 ++- src/commands/reddit.ts | 3 ++- src/commands/reminders.ts | 10 +++++++++- src/commands/tag.ts | 3 ++- src/commands/timezone.ts | 3 ++- src/commands/twitch.ts | 3 ++- src/commands/unicode.ts | 3 ++- src/commands/weather.ts | 3 ++- src/commands/wikipedia.ts | 3 ++- src/commands/youtube.ts | 3 ++- 19 files changed, 46 insertions(+), 18 deletions(-) diff --git a/src/commands/choice.ts b/src/commands/choice.ts index e948df9cd..9839cf399 100644 --- a/src/commands/choice.ts +++ b/src/commands/choice.ts @@ -2,10 +2,11 @@ import { escapeInlineCode } from '#lib/common/escape'; import { LanguageKeys } from '#lib/i18n/LanguageKeys'; import { Command, RegisterCommand } from '@skyra/http-framework'; import { applyLocalizedBuilder, resolveKey, resolveUserKey } from '@skyra/http-framework-i18n'; -import { InteractionContextType, MessageFlags } from 'discord-api-types/v10'; +import { ApplicationIntegrationType, InteractionContextType, MessageFlags } from 'discord-api-types/v10'; @RegisterCommand((builder) => applyLocalizedBuilder(builder, LanguageKeys.Commands.Choice.RootName, LanguageKeys.Commands.Choice.RootDescription) // + .setIntegrationTypes(ApplicationIntegrationType.GuildInstall, ApplicationIntegrationType.UserInstall) .setContexts(InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel) .addStringOption((builder) => applyLocalizedBuilder(builder, LanguageKeys.Commands.Choice.OptionsValues).setMinLength(3).setRequired(true)) ) diff --git a/src/commands/color.ts b/src/commands/color.ts index 4e19cb370..3fbeec7b4 100644 --- a/src/commands/color.ts +++ b/src/commands/color.ts @@ -8,12 +8,13 @@ import { Command, RegisterCommand } from '@skyra/http-framework'; import { applyLocalizedBuilder, resolveUserKey } from '@skyra/http-framework-i18n'; import { Json, safeTimedFetch } from '@skyra/safe-fetch'; import { formatHex, formatHex8, hsl, oklch, p3, parse, rgb, type Color } from 'culori'; -import { InteractionContextType, MessageFlags } from 'discord-api-types/v10'; +import { ApplicationIntegrationType, InteractionContextType, MessageFlags } from 'discord-api-types/v10'; const Root = LanguageKeys.Commands.Color; @RegisterCommand((builder) => applyLocalizedBuilder(builder, Root.RootName, Root.RootDescription) // + .setIntegrationTypes(ApplicationIntegrationType.GuildInstall, ApplicationIntegrationType.UserInstall) .setContexts(InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel) .addStringOption((builder) => applyLocalizedBuilder(builder, Root.Input).setRequired(true)) ) diff --git a/src/commands/content.ts b/src/commands/content.ts index d818a006a..3c0b4f9c1 100644 --- a/src/commands/content.ts +++ b/src/commands/content.ts @@ -4,11 +4,12 @@ import { codeBlock } from '@discordjs/builders'; import type { RawFile } from '@discordjs/rest'; import { Command, RegisterMessageCommand, RegisterUserCommand, type TransformedArguments } from '@skyra/http-framework'; import { applyNameLocalizedBuilder } from '@skyra/http-framework-i18n'; -import { InteractionContextType, MessageFlags } from 'discord-api-types/v10'; +import { ApplicationIntegrationType, InteractionContextType, MessageFlags } from 'discord-api-types/v10'; export class UserCommand extends Command { @RegisterMessageCommand((builder) => applyNameLocalizedBuilder(builder, LanguageKeys.Commands.Content.MessageJsonName) // + .setIntegrationTypes(ApplicationIntegrationType.GuildInstall, ApplicationIntegrationType.UserInstall) .setContexts(InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel) ) public message(interaction: Command.MessageInteraction, options: TransformedArguments.Message) { @@ -17,6 +18,7 @@ export class UserCommand extends Command { @RegisterUserCommand((builder) => applyNameLocalizedBuilder(builder, LanguageKeys.Commands.Content.UserJsonName) // + .setIntegrationTypes(ApplicationIntegrationType.GuildInstall, ApplicationIntegrationType.UserInstall) .setContexts(InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel) ) public user(interaction: Command.UserInteraction, options: TransformedArguments.User) { diff --git a/src/commands/convert.ts b/src/commands/convert.ts index a4b6891ec..424372613 100644 --- a/src/commands/convert.ts +++ b/src/commands/convert.ts @@ -4,12 +4,13 @@ import { Units, renderUnit, sanitizeUnit, searchUnits } from '#lib/utilities/con import { isNullish } from '@sapphire/utilities'; import { Command, RegisterCommand, type AutocompleteInteractionArguments } from '@skyra/http-framework'; import { applyLocalizedBuilder, getSupportedUserLanguageT, resolveUserKey } from '@skyra/http-framework-i18n'; -import { InteractionContextType, MessageFlags } from 'discord-api-types/v10'; +import { ApplicationIntegrationType, InteractionContextType, MessageFlags } from 'discord-api-types/v10'; const Root = LanguageKeys.Commands.Convert; @RegisterCommand((builder) => applyLocalizedBuilder(builder, Root.RootName, Root.RootDescription) // + .setIntegrationTypes(ApplicationIntegrationType.GuildInstall, ApplicationIntegrationType.UserInstall) .setContexts(InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel) .addNumberOption((builder) => applyLocalizedBuilder(builder, LanguageKeys.Commands.Convert.Amount).setRequired(true)) .addStringOption((builder) => applyLocalizedBuilder(builder, Root.From).setAutocomplete(true).setRequired(true).setMaxLength(100)) diff --git a/src/commands/create-emoji.ts b/src/commands/create-emoji.ts index e0e288610..50078893a 100644 --- a/src/commands/create-emoji.ts +++ b/src/commands/create-emoji.ts @@ -17,6 +17,7 @@ import { Command, RegisterCommand } from '@skyra/http-framework'; import { applyLocalizedBuilder, createSelectMenuChoiceName, resolveKey, resolveUserKey } from '@skyra/http-framework-i18n'; import { safeTimedFetch, type FetchResult } from '@skyra/safe-fetch'; import { + ApplicationIntegrationType, InteractionContextType, MessageFlags, PermissionFlagsBits, @@ -47,6 +48,7 @@ const EmojiRoot = LanguageKeys.Commands.Emoji; createSelectMenuChoiceName(EmojiRoot.OptionsVariantWhatsApp, { value: EmojiSource.WhatsApp }) ) ) + .setIntegrationTypes(ApplicationIntegrationType.GuildInstall) .setContexts(InteractionContextType.Guild) .setDefaultMemberPermissions(PermissionFlagsBits.ManageGuildExpressions) ) diff --git a/src/commands/dictionary.ts b/src/commands/dictionary.ts index e6f988b4b..d9f6d15a8 100644 --- a/src/commands/dictionary.ts +++ b/src/commands/dictionary.ts @@ -7,13 +7,14 @@ import { Result, none, some } from '@sapphire/result'; import { Command, RegisterCommand, type MessageResponseOptions } from '@skyra/http-framework'; import { applyLocalizedBuilder, getSupportedLanguageT, type TFunction } from '@skyra/http-framework-i18n'; import { Json, isAbortError, safeTimedFetch, type FetchError } from '@skyra/safe-fetch'; -import { InteractionContextType, MessageFlags } from 'discord-api-types/v10'; +import { ApplicationIntegrationType, InteractionContextType, MessageFlags } from 'discord-api-types/v10'; import { readFile } from 'node:fs/promises'; const Root = LanguageKeys.Commands.Dictionary; @RegisterCommand((builder) => applyLocalizedBuilder(builder, Root.RootName, Root.RootDescription) // + .setIntegrationTypes(ApplicationIntegrationType.GuildInstall, ApplicationIntegrationType.UserInstall) .setContexts(InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel) .addStringOption((builder) => applyLocalizedBuilder(builder, Root.OptionsInput).setMinLength(2).setMaxLength(45).setRequired(true)) ) diff --git a/src/commands/emoji.ts b/src/commands/emoji.ts index 7d4f639fc..8b8b1a47d 100644 --- a/src/commands/emoji.ts +++ b/src/commands/emoji.ts @@ -9,12 +9,13 @@ import { isNullish, isNullishOrEmpty } from '@sapphire/utilities'; import { Command, RegisterCommand, RegisterMessageCommand, type TransformedArguments } from '@skyra/http-framework'; import { applyLocalizedBuilder, applyNameLocalizedBuilder, createSelectMenuChoiceName, resolveKey, resolveUserKey } from '@skyra/http-framework-i18n'; import { safeTimedFetch } from '@skyra/safe-fetch'; -import { InteractionContextType, MessageFlags } from 'discord-api-types/v10'; +import { ApplicationIntegrationType, InteractionContextType, MessageFlags } from 'discord-api-types/v10'; const Root = LanguageKeys.Commands.Emoji; @RegisterCommand((builder) => applyLocalizedBuilder(builder, Root.RootName, Root.RootDescription) + .setIntegrationTypes(ApplicationIntegrationType.GuildInstall, ApplicationIntegrationType.UserInstall) .setContexts(InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel) .addStringOption((builder) => applyLocalizedBuilder(builder, Root.OptionsEmoji).setRequired(true)) .addStringOption((builder) => diff --git a/src/commands/manage-tag.ts b/src/commands/manage-tag.ts index c2e540362..fae9f2eb4 100644 --- a/src/commands/manage-tag.ts +++ b/src/commands/manage-tag.ts @@ -11,7 +11,7 @@ import { Command, RegisterCommand, RegisterSubcommand, type AutocompleteInteract import { applyLocalizedBuilder, getSupportedUserLanguageT, resolveUserKey, type TypedFT, type TypedT, type Value } from '@skyra/http-framework-i18n'; import { isAbortError } from '@skyra/safe-fetch'; import { rgb } from 'culori'; -import { InteractionContextType, MessageFlags, PermissionFlagsBits, TextInputStyle } from 'discord-api-types/v10'; +import { ApplicationIntegrationType, InteractionContextType, MessageFlags, PermissionFlagsBits, TextInputStyle } from 'discord-api-types/v10'; const Root = LanguageKeys.Commands.ManageTag; @@ -33,6 +33,7 @@ const MaximumContentLength = 4096; @RegisterCommand((builder) => applyLocalizedBuilder(builder, Root.RootName, Root.RootDescription) + .setIntegrationTypes(ApplicationIntegrationType.GuildInstall) .setContexts(InteractionContextType.Guild) .setDefaultMemberPermissions(PermissionFlagsBits.ManageGuild) ) diff --git a/src/commands/poll.ts b/src/commands/poll.ts index 3c2293ebb..96efbe528 100644 --- a/src/commands/poll.ts +++ b/src/commands/poll.ts @@ -3,12 +3,13 @@ import { bold, SlashCommandStringOption } from '@discordjs/builders'; import { Result } from '@sapphire/result'; import { Command, Message, RegisterCommand } from '@skyra/http-framework'; import { applyLocalizedBuilder, type TypedT } from '@skyra/http-framework-i18n'; -import { InteractionContextType, Routes } from 'discord-api-types/v10'; +import { ApplicationIntegrationType, InteractionContextType, Routes } from 'discord-api-types/v10'; const Root = LanguageKeys.Commands.Poll; @RegisterCommand((builder) => applyLocalizedBuilder(builder, Root.RootName, Root.RootDescription) // + .setIntegrationTypes(ApplicationIntegrationType.GuildInstall, ApplicationIntegrationType.UserInstall) .setContexts(InteractionContextType.Guild, InteractionContextType.PrivateChannel) .addStringOption((builder) => applyLocalizedBuilder(builder, Root.OptionsTitle).setRequired(true)) .addStringOption(UserCommand.makeOption(Root.OptionsFirstName).setRequired(true)) diff --git a/src/commands/price.ts b/src/commands/price.ts index ae3d2184b..f79b28a1d 100644 --- a/src/commands/price.ts +++ b/src/commands/price.ts @@ -6,12 +6,13 @@ import { envIsDefined, envParseString } from '@skyra/env-utilities'; import { Command, RegisterCommand, type MakeArguments } from '@skyra/http-framework'; import { applyLocalizedBuilder, getSupportedLanguageT, resolveUserKey, type TFunction } from '@skyra/http-framework-i18n'; import { Json, isAbortError, safeTimedFetch, type FetchError } from '@skyra/safe-fetch'; -import { InteractionContextType, MessageFlags, type LocaleString } from 'discord-api-types/v10'; +import { ApplicationIntegrationType, InteractionContextType, MessageFlags, type LocaleString } from 'discord-api-types/v10'; const Root = LanguageKeys.Commands.Price; @RegisterCommand((builder) => applyLocalizedBuilder(builder, Root.RootName, Root.RootDescription) + .setIntegrationTypes(ApplicationIntegrationType.GuildInstall, ApplicationIntegrationType.UserInstall) .setContexts(InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel) .addStringOption((builder) => // T - SAFEMOON diff --git a/src/commands/reddit.ts b/src/commands/reddit.ts index f57907e4f..fffd7fd08 100644 --- a/src/commands/reddit.ts +++ b/src/commands/reddit.ts @@ -18,12 +18,13 @@ import { type RedditError } from '@skyra/reddit-helpers'; import { isAbortError, type FetchError } from '@skyra/safe-fetch'; -import { InteractionContextType, MessageFlags } from 'discord-api-types/v10'; +import { ApplicationIntegrationType, InteractionContextType, MessageFlags } from 'discord-api-types/v10'; const Root = LanguageKeys.Commands.Reddit; @RegisterCommand((builder) => applyLocalizedBuilder(builder, Root.RootName, Root.RootDescription) // + .setIntegrationTypes(ApplicationIntegrationType.GuildInstall, ApplicationIntegrationType.UserInstall) .setContexts(InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel) ) export class UserCommand extends Command { diff --git a/src/commands/reminders.ts b/src/commands/reminders.ts index 05133c81f..d2847b640 100644 --- a/src/commands/reminders.ts +++ b/src/commands/reminders.ts @@ -29,13 +29,21 @@ import { resolveKey, resolveUserKey } from '@skyra/http-framework-i18n'; -import { ButtonStyle, InteractionContextType, MessageFlags, Routes, type RESTPatchAPIChannelMessageJSONBody } from 'discord-api-types/v10'; +import { + ApplicationIntegrationType, + ButtonStyle, + InteractionContextType, + MessageFlags, + Routes, + type RESTPatchAPIChannelMessageJSONBody +} from 'discord-api-types/v10'; import { DateTime, Duration } from 'luxon'; const Root = LanguageKeys.Commands.Reminders; @RegisterCommand((builder) => applyLocalizedBuilder(builder, Root.RootName, Root.RootDescription) // + .setIntegrationTypes(ApplicationIntegrationType.GuildInstall, ApplicationIntegrationType.UserInstall) .setContexts(InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel) ) export class UserCommand extends Command { diff --git a/src/commands/tag.ts b/src/commands/tag.ts index 4905d3330..c585f7c66 100644 --- a/src/commands/tag.ts +++ b/src/commands/tag.ts @@ -5,12 +5,13 @@ import type { Tag } from '@prisma/client'; import { isNullish } from '@sapphire/utilities'; import { Command, RegisterCommand, type AutocompleteInteractionArguments, type TransformedArguments } from '@skyra/http-framework'; import { applyLocalizedBuilder, resolveKey, resolveUserKey } from '@skyra/http-framework-i18n'; -import { InteractionContextType, MessageFlags, type APIAllowedMentions } from 'discord-api-types/v10'; +import { ApplicationIntegrationType, InteractionContextType, MessageFlags, type APIAllowedMentions } from 'discord-api-types/v10'; const Root = LanguageKeys.Commands.Tag; @RegisterCommand((builder) => applyLocalizedBuilder(builder, Root.RootName, Root.RootDescription) + .setIntegrationTypes(ApplicationIntegrationType.GuildInstall) .setContexts(InteractionContextType.Guild) .addStringOption((builder) => applyLocalizedBuilder(builder, Root.OptionsName).setAutocomplete(true).setRequired(true)) .addBooleanOption((builder) => applyLocalizedBuilder(builder, Root.OptionsHide)) diff --git a/src/commands/timezone.ts b/src/commands/timezone.ts index 2c4bb2dce..6414005ab 100644 --- a/src/commands/timezone.ts +++ b/src/commands/timezone.ts @@ -5,12 +5,13 @@ import { Result } from '@sapphire/result'; import { isNullish } from '@sapphire/utilities'; import { Command, RegisterCommand, RegisterSubcommand, type AutocompleteInteractionArguments } from '@skyra/http-framework'; import { applyLocalizedBuilder, getSupportedUserLanguageName, resolveUserKey } from '@skyra/http-framework-i18n'; -import { InteractionContextType, MessageFlags } from 'discord-api-types/v10'; +import { ApplicationIntegrationType, InteractionContextType, MessageFlags } from 'discord-api-types/v10'; const Root = LanguageKeys.Commands.TimeZone; @RegisterCommand((builder) => applyLocalizedBuilder(builder, Root.RootName, Root.RootDescription) // + .setIntegrationTypes(ApplicationIntegrationType.GuildInstall, ApplicationIntegrationType.UserInstall) .setContexts(InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel) ) export class UserCommand extends Command { diff --git a/src/commands/twitch.ts b/src/commands/twitch.ts index 80dc31767..6160038f1 100644 --- a/src/commands/twitch.ts +++ b/src/commands/twitch.ts @@ -3,12 +3,13 @@ import { EmbedBuilder } from '@discordjs/builders'; import { Command, RegisterCommand } from '@skyra/http-framework'; import { applyLocalizedBuilder, getSupportedLanguageT } from '@skyra/http-framework-i18n'; import { TwitchBrandingColor, TwitchLogoUrl, areTwitchClientCredentialsSet, fetchUserFollowage, fetchUsers } from '@skyra/twitch-helpers'; -import { InteractionContextType, MessageFlags } from 'discord-api-types/v10'; +import { ApplicationIntegrationType, InteractionContextType, MessageFlags } from 'discord-api-types/v10'; const Root = LanguageKeys.Commands.Twitch; @RegisterCommand((builder) => applyLocalizedBuilder(builder, Root.RootName, Root.RootDescription) // + .setIntegrationTypes(ApplicationIntegrationType.GuildInstall, ApplicationIntegrationType.UserInstall) .setContexts(InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel) .addStringOption((builder) => applyLocalizedBuilder(builder, Root.UserOptionsName).setMinLength(2).setMaxLength(20).setRequired(true)) ) diff --git a/src/commands/unicode.ts b/src/commands/unicode.ts index 0cc0ae936..bf1b1db50 100644 --- a/src/commands/unicode.ts +++ b/src/commands/unicode.ts @@ -11,12 +11,13 @@ import { type TFunction, type TypedT } from '@skyra/http-framework-i18n'; -import { InteractionContextType, MessageFlags } from 'discord-api-types/v10'; +import { ApplicationIntegrationType, InteractionContextType, MessageFlags } from 'discord-api-types/v10'; const Root = LanguageKeys.Commands.Unicode; @RegisterCommand((builder) => applyLocalizedBuilder(builder, Root.RootName, Root.RootDescription) // + .setIntegrationTypes(ApplicationIntegrationType.GuildInstall, ApplicationIntegrationType.UserInstall) .setContexts(InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel) ) export class UserCommand extends Command { diff --git a/src/commands/weather.ts b/src/commands/weather.ts index 1557b43b0..3c2dc9645 100644 --- a/src/commands/weather.ts +++ b/src/commands/weather.ts @@ -23,12 +23,13 @@ import { } from '@skyra/http-framework-i18n'; import { getWeatherData, getWeatherName, type CurrentCondition, type ValueWrapper, type Weather } from '@skyra/weather-helpers'; import { Canvas } from 'canvas-constructor/napi-rs'; -import { InteractionContextType, MessageFlags, type LocaleString } from 'discord-api-types/v10'; +import { ApplicationIntegrationType, InteractionContextType, MessageFlags, type LocaleString } from 'discord-api-types/v10'; const Root = LanguageKeys.Commands.Weather; @RegisterCommand((builder) => applyLocalizedBuilder(builder, Root.RootName, Root.RootDescription) + .setIntegrationTypes(ApplicationIntegrationType.GuildInstall, ApplicationIntegrationType.UserInstall) .setContexts(InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel) .addStringOption((builder) => applyLocalizedBuilder(builder, Root.OptionsPlace).setMinLength(3).setMaxLength(85).setRequired(true)) .addStringOption((builder) => diff --git a/src/commands/wikipedia.ts b/src/commands/wikipedia.ts index 55dba0446..13249e278 100644 --- a/src/commands/wikipedia.ts +++ b/src/commands/wikipedia.ts @@ -7,12 +7,13 @@ import { isNullishOrEmpty } from '@sapphire/utilities'; import { Command, RegisterCommand, type AutocompleteInteractionArguments } from '@skyra/http-framework'; import { applyLocalizedBuilder, resolveKey, resolveUserKey, type TypedT } from '@skyra/http-framework-i18n'; import { Json, isAbortError, safeTimedFetch } from '@skyra/safe-fetch'; -import { InteractionContextType, MessageFlags } from 'discord-api-types/v10'; +import { ApplicationIntegrationType, InteractionContextType, MessageFlags } from 'discord-api-types/v10'; const Root = LanguageKeys.Commands.Wikipedia; @RegisterCommand((builder) => applyLocalizedBuilder(builder, Root.RootName, Root.RootDescription) // + .setIntegrationTypes(ApplicationIntegrationType.GuildInstall, ApplicationIntegrationType.UserInstall) .setContexts(InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel) .addStringOption((builder) => applyLocalizedBuilder(builder, Root.OptionsInput).setAutocomplete(true).setRequired(true)) ) diff --git a/src/commands/youtube.ts b/src/commands/youtube.ts index 08950a945..1a876e02d 100644 --- a/src/commands/youtube.ts +++ b/src/commands/youtube.ts @@ -8,13 +8,14 @@ import { envParseString } from '@skyra/env-utilities'; import { Command, RegisterCommand, type MessageResponseOptions } from '@skyra/http-framework'; import { applyLocalizedBuilder, createSelectMenuChoiceName, resolveUserKey } from '@skyra/http-framework-i18n'; import { Json, isAbortError, safeTimedFetch, type FetchError } from '@skyra/safe-fetch'; -import { InteractionContextType, MessageFlags, type APISelectMenuOption } from 'discord-api-types/v10'; +import { ApplicationIntegrationType, InteractionContextType, MessageFlags, type APISelectMenuOption } from 'discord-api-types/v10'; import he from 'he'; const Root = LanguageKeys.Commands.YouTube; @RegisterCommand((builder) => applyLocalizedBuilder(builder, Root.RootName, Root.RootDescription) + .setIntegrationTypes(ApplicationIntegrationType.GuildInstall, ApplicationIntegrationType.UserInstall) .setContexts(InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel) .addStringOption((builder) => applyLocalizedBuilder(builder, Root.OptionsQuery).setRequired(true)) .addStringOption((builder) =>