Skip to content

chore: Include discord.js in the user agent string #9267

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

Merged
merged 20 commits into from
Apr 1, 2023
Merged

chore: Include discord.js in the user agent string #9267

merged 20 commits into from
Apr 1, 2023

Conversation

Jiralite
Copy link
Member

Please describe the changes this PR makes and why it should be merged:
This includes discord.js in the user agent string, even if a custom appendix is supplied.

Status and versioning classification:

  • Code changes have been tested against the Discord API, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating

@vercel
Copy link

vercel bot commented Mar 23, 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 Apr 1, 2023 10:20pm
discord-js-guide ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 1, 2023 10:20pm

Co-authored-by: Aura Román <kyradiscord@gmail.com>
@Jiralite Jiralite marked this pull request as ready for review March 24, 2023 02:13
@codecov
Copy link

codecov bot commented Mar 24, 2023

Codecov Report

Merging #9267 (9dbef03) into main (e2f39cc) will increase coverage by 19.87%.
The diff coverage is 85.71%.

@@             Coverage Diff             @@
##             main    #9267       +/-   ##
===========================================
+ Coverage   59.92%   79.79%   +19.87%     
===========================================
  Files         214      123       -91     
  Lines       13721    10309     -3412     
  Branches     1245     1155       -90     
===========================================
+ Hits         8222     8226        +4     
+ Misses       5459     2043     -3416     
  Partials       40       40               
Flag Coverage Δ
proxy 79.56% <ø> (ø)
rest 91.89% <85.71%> (-0.03%) ⬇️
website ?
ws 57.61% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/rest/src/lib/utils/constants.ts 96.87% <83.33%> (-1.44%) ⬇️
packages/rest/src/lib/REST.ts 98.87% <100.00%> (ø)

... and 99 files with indirect coverage changes

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

Copy link
Member

@almeidx almeidx left a comment

Choose a reason for hiding this comment

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

As a side note, shouldn't /rest's default user agent URL point to the new docs (https://discordjs.dev/docs/packages/rest or something), or use @discordjs/rest@<version> in the version itself? Currently, it's set to DiscordBot (https://discord.js.org, 1.6.0)

@Jiralite
Copy link
Member Author

From https://discord.com/developers/docs/reference#user-agent-user-agent-example, there doesn't seem to be a place to include @discordjs/rest—supposedly, the URL accounts for that. Changing the URL to the new documentation site would probably be best done in another pull request where we change everything over.

@vercel
Copy link

vercel bot commented Mar 28, 2023

@Jiralite is attempting to deploy a commit to the discordjs Team on Vercel.

A member of the Team first needs to authorize it.

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.

5 participants