Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add new params to IDiscordSDK #293

Merged
merged 2 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading