Skip to content

Discord Events#147

Merged
momintlh merged 4 commits into
mainfrom
discord-events
May 29, 2025
Merged

Discord Events#147
momintlh merged 4 commits into
mainfrom
discord-events

Conversation

@momintlh
Copy link
Copy Markdown
Collaborator

Support for the following Events:

      READY,
      ORIENTATION_UPDATE,
      ENTITLEMENT_CREATE,
      ACTIVITY_INSTANCE_PARTICIPANTS_UPDATE,
      ACTIVITY_LAYOUT_MODE_UPDATE,
      THERMAL_STATE_UPDATE,
  • Also adds return error for StartPurchase.

@momintlh momintlh merged commit 8e32e75 into main May 29, 2025
2 checks passed
Copy link
Copy Markdown
Collaborator

@SaadBazaz SaadBazaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the review post-merge, but best to catch some small nits here.

Comment thread .gitignore
Assets/chromedriver*
Assets/msedgedriver.exe
Assets/msedgedriver.exe.meta
Assets/PlayroomKit/src/frameworks copy.ts
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a typo or a dev artifact. Why does this file exist in the first place?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was testing types, so made that, I want to move the bridge (index JS) to Typescript for code completion and use that to generate JSLIB (adding a copy command, instead of npm i), I will create an issue for that.


public void SubscribeDiscordEvent(SDKEvent eventName, Action<string> callback)
{
DebugLogger.LogWarning("[MockMode] Discord events only work inside discord!");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have local browser mock-mode work with Discord? e.g. by putting localhost:3000 in the Discord Developer portal? If yes, this should probably read "Discord events not supported in browser mock mode!" like the others.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The game needs to run inside discord to call any commands from discord sdk or subscribe to those events, I don't its gonna work.


public void SubscribeDiscordEvent(SDKEvent eventName, Action<string> callback)
{
DebugLogger.LogWarning("[MockMode] Discord events only work inside discord!");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is local / single player mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants