UNPKG

dissonity

Version:

Extension of the Discord Embedded App SDK that allows you to create activities alongside the Dissonity v1 Unity package

20 lines (16 loc) 653 B
import { DiscordSDK } from '@discord/embedded-app-sdk'; export { DiscordSDK } from '@discord/embedded-app-sdk'; type ConfigOptions = { clientId: string; scope: ScopeArgument; tokenRoute: `/${string}`; }; type ScopeArgument = Parameters<DiscordSDK["commands"]["authorize"]>[0]["scope"]; type AuthUser = Awaited<ReturnType<DiscordSDK["commands"]["authenticate"]>>["user"]; type DataPromise = Promise<{ discordSdk: DiscordSDK; user: AuthUser | null; }>; declare function setupSdk(options: ConfigOptions): Promise<void>; declare function useSdk(dataPromise: DataPromise): Promise<void>; export { type DataPromise, setupSdk, useSdk };