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

feat(api): add stage instances #9578

Merged
merged 6 commits into from
May 19, 2023
Merged

Conversation

jaw0r3k
Copy link
Contributor

@jaw0r3k jaw0r3k commented May 16, 2023

Please describe the changes this PR makes and why it should be merged:

🤖 Generated by Copilot at c2697cd

This pull request adds a new StageInstancesAPI class to the core package, which allows interacting with the stage instances resource of the Discord API. The class has methods for creating, getting, editing, and deleting stage instances, using the types and routes from the discord-api-types package. The class is exported from the api/index.ts file and added to the API class.

Status and versioning classification:

  • Code changes have been tested against the Discord API
  • I know how to update typings and have done so, or typings don't need updating
  • This PR changes the library's interface (methods or parameters added)

@jaw0r3k jaw0r3k requested a review from a team as a code owner May 16, 2023 15:54
@vercel
Copy link

vercel bot commented May 16, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
discord-js ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 19, 2023 7:24pm
discord-js-guide ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 19, 2023 7:24pm

@jaw0r3k jaw0r3k force-pushed the core-stageInstances branch from e9461c9 to 10bebcc Compare May 16, 2023 16:01
packages/core/src/api/stageInstances.ts Outdated Show resolved Hide resolved
packages/core/src/api/stageInstances.ts Outdated Show resolved Hide resolved
Co-authored-by: Aura Román <kyradiscord@gmail.com>
@Jiralite Jiralite requested a review from kyranet May 17, 2023 16:23
Copy link
Member

@Jiralite Jiralite left a comment

Choose a reason for hiding this comment

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

Ids are snowflakes. Please check the types.

There are 177 results for "The options for..." and 59 for "The options to use...". We're inconsistent here, so try to go with the majority and hopefully a future pull request can standardise the documentation.

packages/core/src/api/stageInstances.ts Outdated Show resolved Hide resolved
Copy link
Member

@Jiralite Jiralite left a comment

Choose a reason for hiding this comment

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

Actually, adding to my previous review, all the places where a stage instance id has been documented are wrong. It should be the channel id. Using a stage instance id will throw an Unknown Channel error.

Co-authored-by: David Malchin <malchin459@gmail.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
packages/core/src/api/stageInstances.ts Outdated Show resolved Hide resolved
packages/core/src/api/stageInstances.ts Outdated Show resolved Hide resolved
packages/core/src/api/stageInstances.ts Outdated Show resolved Hide resolved
Co-authored-by: David Malchin <malchin459@gmail.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
@codecov
Copy link

codecov bot commented May 19, 2023

Codecov Report

Merging #9578 (3b233dd) into main (1c4a12c) will increase coverage by 0.02%.
The diff coverage is n/a.

❗ Current head 3b233dd differs from pull request most recent head 03f9d1d. Consider uploading reports for the commit 03f9d1d to get more accurate results

@@            Coverage Diff             @@
##             main    #9578      +/-   ##
==========================================
+ Coverage   58.17%   58.20%   +0.02%     
==========================================
  Files         227      227              
  Lines       14891    14902      +11     
  Branches     1130     1133       +3     
==========================================
+ Hits         8663     8673      +10     
- Misses       6188     6189       +1     
  Partials       40       40              

see 3 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@github-actions
Copy link

github-actions bot commented May 19, 2023

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟢 Performance 99
🟢 Accessibility 100
🟢 Best practices 100
🟢 SEO 100
🟠 PWA 70

Lighthouse ran on https://discord-js-git-fork-jaw0r3k-core-stageinstances-discordjs.vercel.app/

@kodiakhq kodiakhq bot merged commit 985def3 into discordjs:main May 19, 2023
@jaw0r3k jaw0r3k deleted the core-stageInstances branch May 19, 2023 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants