Skip to content

Commit

Permalink
👽️ feat: add new user apps feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Helloyunho committed Nov 30, 2023
1 parent a556160 commit 8705835
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
6 changes: 6 additions & 0 deletions types/src/applications/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ export interface ApplicationPayload {
install_params?: ApplicationInstallParams;
custom_install_url?: string;
role_connections_verification_url?: string;
integration_types?: ApplicationIntegrationType[];
}

export enum ApplicationIntegrationType {
GUILD_INSTALL = 0,
USER_INSTALL = 1,
}

export interface ApplicationInstallParams {
Expand Down
9 changes: 9 additions & 0 deletions types/src/interactions/command.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { ApplicationIntegrationType } from "../applications/application.ts";
import { ChannelType } from "../channels/base.ts";
import { Locales } from "../etc/locales.ts";

Expand All @@ -15,6 +16,14 @@ export interface ApplicationCommandPayload {
dm_permission?: boolean;
nsfw?: boolean;
version: string;
contexts?: ApplicationCommandContextType[];
integration_types?: ApplicationIntegrationType[];
}

export enum ApplicationCommandContextType {
GUILD = 0,
BOT_DM = 1,
PRIVATE_CHANNEL = 2,
}

export enum ApplicationCommandType {
Expand Down
2 changes: 2 additions & 0 deletions types/src/interactions/interaction.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { ApplicationIntegrationType } from "../applications/application.ts";
import { ChannelPayload } from "../channels/base.ts";
import { EmbedPayload } from "../channels/embed.ts";
import { AllowedMentionsPayload } from "../channels/etc.ts";
Expand Down Expand Up @@ -37,6 +38,7 @@ export interface InteractionPayload {
app_permissions?: string;
locale?: Locales;
guild_locale?: Locales;
authorizing_integration_owners: Record<ApplicationIntegrationType, string>;
}

export enum InteractionType {
Expand Down

0 comments on commit 8705835

Please sign in to comment.