Skip to content

Commit

Permalink
fix: add new params to IDiscordSDK (#293)
Browse files Browse the repository at this point in the history
  • Loading branch information
goatslacker authored Dec 16, 2024
1 parent 8a770ff commit 6182474
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ export type MaybeZodObjectArray<T extends EventArgs> =
export interface IDiscordSDK {
readonly clientId: string;
readonly instanceId: string;
readonly customId: string | null;
readonly referrerId: string | null;
readonly platform: Platform;
readonly mobileAppVersion: string | null;
readonly sdkVersion: string;
Expand Down
4 changes: 4 additions & 0 deletions src/mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export class DiscordSDKMock implements IDiscordSDK {
readonly clientId: string;
readonly platform = Platform.DESKTOP;
readonly instanceId = '123456789012345678';
readonly customId: string | null;
readonly referrerId: string | null;
readonly configuration = getDefaultSdkConfiguration();
readonly source: Window | WindowProxy | null = null;
readonly sourceOrigin: string = '';
Expand All @@ -33,6 +35,8 @@ export class DiscordSDKMock implements IDiscordSDK {
this.guildId = guildId;
this.channelId = channelId;
this.locationId = locationId;
this.customId = null;
this.referrerId = null;
}

_updateCommandMocks(newCommands: Partial<IDiscordSDK['commands']>) {
Expand Down

0 comments on commit 6182474

Please sign in to comment.