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 Embedded App SDK doc for setOrientationLockState()
#6759
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A table should maybe be included for the mapping from int to flag
#### Lock States
| Type | State |
| ==== | ========== |
| 1 | Unlocked |
| 2 | Portrait |
| 3 | Landscape |
#### Grid Lock States
| Type | State |
| ==== | ======== |
| 1 | Unlocked |
| 2 | Locked |
@Snazzah thanks for this! I'll take a peek. These are currently manually written but will be auto-generated soon™️, so we'll have things like types/etc included in tables. |
@@ -493,15 +493,15 @@ Locks the application to specific orientations in each of the supported layout m | |||
|
|||
#### Required Scopes | |||
|
|||
- guilds.members.read | |||
No scopes required |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great callout. Yes, no scopes are required for this command.
lock_state: 3, // landscape | ||
picture_in_picture_lock_state: 3, // landscape | ||
grid_lock_state: 1 // unlocked |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a rough edge case where we offer an enum, but getting to it is a bit verbose
lock_state: 3, // landscape | |
picture_in_picture_lock_state: 3, // landscape | |
grid_lock_state: 1 // unlocked | |
lock_state: Common.OrientationLockStateTypeObject.LANDSCAPE, | |
picture_in_picture_lock_state: Common.OrientationLockStateTypeObject.LANDSCAPE, | |
grid_lock_state: Common.OrientationLockStateTypeObject.UNLOCKED |
Ideally we could also show above this snippet
import {Common} from '@discord/embedded-app-sdk';
Thanks for surfacing the issue! Addressed in #6863 |
Seems like this command doesn't actually need the
guilds.members.read
scope, and the values in the usage doesn't use strings.