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: Add channel & message URL formatters #8371

Merged
merged 5 commits into from Jul 29, 2022

Conversation

Jiralite
Copy link
Member

Please describe the changes this PR makes and why it should be merged:
Adds channelLink() and messageLink() which formats a link to a channel or message respectively.

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 Jul 26, 2022

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

Name Status Preview Updated
discord-js ✅ Ready (Inspect) Visit Preview Jul 28, 2022 at 6:02PM (UTC)

@Jiralite Jiralite added this to the builders v2 milestone Jul 26, 2022
@vercel vercel bot temporarily deployed to Preview July 26, 2022 18:01 Inactive
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.

These should be re-exported in discord.js and used in the Message#url and Channel#url getters

@codecov
Copy link

codecov bot commented Jul 26, 2022

Codecov Report

Merging #8371 (66debf0) into main (5494791) will increase coverage by 0.09%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #8371      +/-   ##
==========================================
+ Coverage   86.40%   86.49%   +0.09%     
==========================================
  Files          87       87              
  Lines        8221     8278      +57     
  Branches     1098     1104       +6     
==========================================
+ Hits         7103     7160      +57     
  Misses       1075     1075              
  Partials       43       43              
Flag Coverage Δ
builders 100.00% <100.00%> (ø)
collection 100.00% <ø> (ø)
proxy 73.28% <ø> (ø)
rest 92.53% <ø> (ø)
utilities 100.00% <ø> (ø)
voice 64.08% <ø> (ø)
ws 60.26% <ø> (ø)

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

Impacted Files Coverage Δ
packages/builders/src/messages/formatters.ts 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us.

@Jiralite Jiralite removed this from the builders v2 milestone Jul 26, 2022
@Jiralite
Copy link
Member Author

These should be re-exported in discord.js and used in the Message#url and Channel#url getters

This should be done with c19f6d9.

@vercel vercel bot temporarily deployed to Preview July 26, 2022 18:18 Inactive
@Syjalo
Copy link
Contributor

Syjalo commented Jul 26, 2022

Maybe you will add also for users?
https://discord.com/users/:id
It turns out that this link is valid only for the mobile version. I don't think it should be here.

@vercel vercel bot temporarily deployed to Preview July 26, 2022 18:48 Inactive
@Jiralite Jiralite marked this pull request as draft July 26, 2022 21:28
@Jiralite Jiralite marked this pull request as ready for review July 27, 2022 00:00
@vercel vercel bot temporarily deployed to Preview July 27, 2022 00:04 Inactive
@vercel vercel bot temporarily deployed to Preview July 27, 2022 09:37 Inactive
@vercel vercel bot temporarily deployed to Preview July 27, 2022 11:02 Inactive
@vercel vercel bot temporarily deployed to Preview July 27, 2022 20:34 Inactive
@vercel vercel bot temporarily deployed to Preview July 28, 2022 18:02 Inactive
@iCrawl iCrawl merged commit a7deb8f into discordjs:main Jul 29, 2022
@Jiralite Jiralite deleted the feat/url-formatter branch July 29, 2022 16:19
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.

None yet

7 participants