From 1cb21ce6b13c90b978b0f3a84aed180e2ef0827e Mon Sep 17 00:00:00 2001 From: Jorge Date: Sun, 24 Nov 2024 19:12:25 -0600 Subject: [PATCH] add mp.discord.requestOAuth2 --- packages/client/index.d.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/packages/client/index.d.ts b/packages/client/index.d.ts index a6f8ed1..f13f2bc 100644 --- a/packages/client/index.d.ts +++ b/packages/client/index.d.ts @@ -261,6 +261,22 @@ declare interface DiscordMp { * ![DISCORD_RICH_PRESENCE](https://wiki.rage.mp/images/c/c4/UpdatedRichPresence.jpg), */ update(status: string, state: string): void; + + + /** + * + * Ask user to authorize your application with Discord. Returns an authorization code. + * + * @param applicationId Application ID + * @returns Promise + * + * @example + * ```js + * const authorizationCode = await mp.discord.requestOAuth('123456789') + * ``` + */ + + requestOAuth2(applicationId: string): Promise; } declare interface ConsoleMp {